libflame revision_anchor
Functions
FLA_Nrm2_external.c File Reference

(r)

Functions

FLA_Error FLA_Nrm2_external (FLA_Obj x, FLA_Obj norm_x)
 

Function Documentation

◆ FLA_Nrm2_external()

FLA_Error FLA_Nrm2_external ( FLA_Obj  x,
FLA_Obj  norm_x 
)
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18
21
22 if ( FLA_Obj_has_zero_dim( x ) )
23 {
25 return FLA_SUCCESS;
26 }
27
28 datatype = FLA_Obj_datatype( x );
29
32
33
34 switch ( datatype ){
35
36 case FLA_FLOAT:
37 {
38 float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
39 float *buff_norm_x = ( float * ) FLA_FLOAT_PTR( norm_x );
40
44
45 break;
46 }
47
48 case FLA_DOUBLE:
49 {
50 double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
51 double *buff_norm_x = ( double * ) FLA_DOUBLE_PTR( norm_x );
52
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
63 float *buff_norm_x = ( float * ) FLA_FLOAT_PTR( norm_x );
64
68
69 break;
70 }
71
73 {
75 double *buff_norm_x = ( double * ) FLA_DOUBLE_PTR( norm_x );
76
80
81 break;
82 }
83
84 }
85
86 return FLA_SUCCESS;
87}
FLA_Error FLA_Nrm2_check(FLA_Obj x, FLA_Obj norm)
Definition FLA_Nrm2_check.c:13
FLA_Obj FLA_ZERO
Definition FLA_Init.c:20
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition FLA_Query.c:145
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition FLA_Query.c:137
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set.c:13
int i
Definition bl1_axmyv2.c:145
void bl1_znrm2(int n, dcomplex *x, int incx, double *norm)
Definition bl1_nrm2.c:46
void bl1_snrm2(int n, float *x, int incx, float *norm)
Definition bl1_nrm2.c:13
void bl1_dnrm2(int n, double *x, int incx, double *norm)
Definition bl1_nrm2.c:24
void bl1_cnrm2(int n, scomplex *x, int incx, float *norm)
Definition bl1_nrm2.c:35
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_cnrm2(), bl1_dnrm2(), bl1_snrm2(), bl1_znrm2(), FLA_Check_error_level(), FLA_Nrm2_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Set(), FLA_ZERO, and i.

Referenced by FLA_Nrm2().