libflame revision_anchor
Functions
bl1_maxabsm.c File Reference

(r)

Functions

void bl1_smaxabsm (int m, int n, float *a, int a_rs, int a_cs, float *maxabs)
 
void bl1_dmaxabsm (int m, int n, double *a, int a_rs, int a_cs, double *maxabs)
 
void bl1_cmaxabsm (int m, int n, scomplex *a, int a_rs, int a_cs, float *maxabs)
 
void bl1_zmaxabsm (int m, int n, dcomplex *a, int a_rs, int a_cs, double *maxabs)
 

Function Documentation

◆ bl1_cmaxabsm()

void bl1_cmaxabsm ( int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
float maxabs 
)
104{
105 float zero = bl1_s0();
107 float maxabs_cand;
108 float maxabs_temp;
109 int inca, lda;
110 int n_iter;
111 int n_elem;
112 int j;
113
114 // Return early if possible.
115 if ( bl1_zero_dim2( m, n ) ) { *maxabs = zero; return; }
116
117 // Initialize with optimal values for column-major storage.
118 inca = a_rs;
119 lda = a_cs;
120 n_iter = n;
121 n_elem = m;
122
123 // An optimization: if A is row-major, then let's access the matrix by
124 // rows instead of by columns for increased spatial locality.
125 if ( bl1_is_row_storage( a_rs, a_cs ) )
126 {
129 }
130
131 // Initialize the maximum absolute value candidate to the first element.
133
134 for ( j = 0; j < n_iter; j++ )
135 {
136 a_begin = a + j*lda;
137
139 a_begin, inca,
140 &maxabs_temp );
141
143 }
144
146}
int i
Definition bl1_axmyv2.c:145
int bl1_is_row_storage(int rs, int cs)
Definition bl1_is.c:95
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
float bl1_s0(void)
Definition bl1_constants.c:111
void bl1_cmaxabsv(int n, scomplex *x, int incx, float *maxabs)
Definition bl1_maxabsv.c:55
Definition blis_type_defs.h:133

References bl1_cmaxabsv(), bl1_is_row_storage(), bl1_s0(), and bl1_zero_dim2().

Referenced by FLA_Max_abs_value().

◆ bl1_dmaxabsm()

void bl1_dmaxabsm ( int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
double maxabs 
)
59{
60 double zero = bl1_d0();
61 double* a_begin;
62 double maxabs_cand;
63 double maxabs_temp;
64 int inca, lda;
65 int n_iter;
66 int n_elem;
67 int j;
68
69 // Return early if possible.
70 if ( bl1_zero_dim2( m, n ) ) { *maxabs = zero; return; }
71
72 // Initialize with optimal values for column-major storage.
73 inca = a_rs;
74 lda = a_cs;
75 n_iter = n;
76 n_elem = m;
77
78 // An optimization: if A is row-major, then let's access the matrix by
79 // rows instead of by columns for increased spatial locality.
81 {
84 }
85
86 // Initialize the maximum absolute value candidate to the first element.
88
89 for ( j = 0; j < n_iter; j++ )
90 {
91 a_begin = a + j*lda;
92
95 &maxabs_temp );
96
98 }
99
101}
void bl1_dmaxabsv(int n, double *x, int incx, double *maxabs)
Definition bl1_maxabsv.c:34
double bl1_d0(void)
Definition bl1_constants.c:118

References bl1_d0(), bl1_dmaxabsv(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Max_abs_value().

◆ bl1_smaxabsm()

void bl1_smaxabsm ( int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
float maxabs 
)
14{
15 float zero = bl1_s0();
16 float* a_begin;
17 float maxabs_cand;
18 float maxabs_temp;
19 int inca, lda;
20 int n_iter;
21 int n_elem;
22 int j;
23
24 // Return early if possible.
25 if ( bl1_zero_dim2( m, n ) ) { *maxabs = zero; return; }
26
27 // Initialize with optimal values for column-major storage.
28 inca = a_rs;
29 lda = a_cs;
30 n_iter = n;
31 n_elem = m;
32
33 // An optimization: if A is row-major, then let's access the matrix by
34 // rows instead of by columns for increased spatial locality.
36 {
39 }
40
41 // Initialize the maximum absolute value candidate to the first element.
43
44 for ( j = 0; j < n_iter; j++ )
45 {
46 a_begin = a + j*lda;
47
50 &maxabs_temp );
51
53 }
54
56}
void bl1_smaxabsv(int n, float *x, int incx, float *maxabs)
Definition bl1_maxabsv.c:13

References bl1_is_row_storage(), bl1_s0(), bl1_smaxabsv(), and bl1_zero_dim2().

Referenced by FLA_Max_abs_value().

◆ bl1_zmaxabsm()

void bl1_zmaxabsm ( int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
double maxabs 
)
149{
150 double zero = bl1_d0();
152 double maxabs_cand;
153 double maxabs_temp;
154 int inca, lda;
155 int n_iter;
156 int n_elem;
157 int j;
158
159 // Return early if possible.
160 if ( bl1_zero_dim2( m, n ) ) { *maxabs = zero; return; }
161
162 // Initialize with optimal values for column-major storage.
163 inca = a_rs;
164 lda = a_cs;
165 n_iter = n;
166 n_elem = m;
167
168 // An optimization: if A is row-major, then let's access the matrix by
169 // rows instead of by columns for increased spatial locality.
170 if ( bl1_is_row_storage( a_rs, a_cs ) )
171 {
174 }
175
176 // Initialize the maximum absolute value candidate to the first element.
178
179 for ( j = 0; j < n_iter; j++ )
180 {
181 a_begin = a + j*lda;
182
184 a_begin, inca,
185 &maxabs_temp );
186
188 }
189
191}
void bl1_zmaxabsv(int n, dcomplex *x, int incx, double *maxabs)
Definition bl1_maxabsv.c:76
Definition blis_type_defs.h:138

References bl1_d0(), bl1_is_row_storage(), bl1_zero_dim2(), and bl1_zmaxabsv().

Referenced by FLA_Max_abs_value().