libflame revision_anchor
Functions
FLA_Max_abs_value.c File Reference

(r)

Functions

FLA_Error FLA_Max_abs_value (FLA_Obj A, FLA_Obj maxabs)
 

Function Documentation

◆ FLA_Max_abs_value()

FLA_Error FLA_Max_abs_value ( FLA_Obj  A,
FLA_Obj  maxabs 
)
14{
15 FLA_Datatype datatype;
17 dim_t m_A, n_A;
19
22
23 datatype = FLA_Obj_datatype( A );
25
26 m_A = FLA_Obj_length( A );
27 n_A = FLA_Obj_width( A );
30
31
32 switch ( datatype ){
33
34 case FLA_FLOAT:
35 {
36 float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
37 float* buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
38
40 n_A,
43
44 break;
45 }
46
47 case FLA_DOUBLE:
48 {
49 double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
50 double* buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
51
53 n_A,
56
57 break;
58 }
59
60 case FLA_COMPLEX:
61 {
62 if ( dt_maxabs == FLA_FLOAT )
63 {
65 float* buff_maxabs = ( float * ) FLA_FLOAT_PTR( maxabs );
66
68 n_A,
71 }
72 else
73 {
76
78 n_A,
80 &(buff_maxabs->real) );
81
82 buff_maxabs->imag = 0.0;
83 }
84
85 break;
86 }
87
89 {
90 if ( dt_maxabs == FLA_DOUBLE )
91 {
93 double* buff_maxabs = ( double * ) FLA_DOUBLE_PTR( maxabs );
94
96 n_A,
99 }
100 else
101 {
104
106 n_A,
107 buff_A, rs_A, cs_A,
108 &(buff_maxabs->real) );
109
110 buff_maxabs->imag = 0.0;
111 }
112
113 break;
114 }
115
116 }
117
118 return FLA_SUCCESS;
119}
FLA_Error FLA_Max_abs_value_check(FLA_Obj A, FLA_Obj amax)
Definition FLA_Max_abs_value_check.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
unsigned long dim_t
Definition FLA_type_defs.h:71
int i
Definition bl1_axmyv2.c:145
void bl1_cmaxabsm(int m, int n, scomplex *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsm.c:103
void bl1_smaxabsm(int m, int n, float *a, int a_rs, int a_cs, float *maxabs)
Definition bl1_maxabsm.c:13
void bl1_dmaxabsm(int m, int n, double *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsm.c:58
void bl1_zmaxabsm(int m, int n, dcomplex *a, int a_rs, int a_cs, double *maxabs)
Definition bl1_maxabsm.c:148
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_cmaxabsm(), bl1_dmaxabsm(), bl1_smaxabsm(), bl1_zmaxabsm(), FLA_Check_error_level(), FLA_Max_abs_value_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), and i.

Referenced by FLA_Norm1(), FLA_Norm_inf(), FLA_Svd_compute_scaling(), and FLA_Svd_ext_u_unb_var1().