libflame revision_anchor
Functions
bl1_invscalm.c File Reference

(r)

Functions

void bl1_sinvscalm (conj1_t conj, int m, int n, float *alpha, float *a, int a_rs, int a_cs)
 
void bl1_dinvscalm (conj1_t conj, int m, int n, double *alpha, double *a, int a_rs, int a_cs)
 
void bl1_csinvscalm (conj1_t conj, int m, int n, float *alpha, scomplex *a, int a_rs, int a_cs)
 
void bl1_cinvscalm (conj1_t conj, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs)
 
void bl1_zdinvscalm (conj1_t conj, int m, int n, double *alpha, dcomplex *a, int a_rs, int a_cs)
 
void bl1_zinvscalm (conj1_t conj, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs)
 

Function Documentation

◆ bl1_cinvscalm()

void bl1_cinvscalm ( conj1_t  conj,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs 
)
170{
173 int lda, inca;
174 int n_iter;
175 int n_elem;
176 int j;
177
178 // Return early if possible.
179 if ( bl1_zero_dim2( m, n ) ) return;
180 if ( bl1_ceq1( alpha ) ) return;
181
182 // Handle cases where A is a vector to ensure that the underlying axpy
183 // gets invoked only once.
184 if ( bl1_is_vector( m, n ) )
185 {
186 // Initialize with values appropriate for a vector.
187 n_iter = 1;
188 n_elem = bl1_vector_dim( m, n );
189 lda = 1; // multiplied by zero when n_iter == 1; not needed.
191 }
192 else // matrix case
193 {
194 // Initialize with optimal values for column-major storage.
195 n_iter = n;
196 n_elem = m;
197 lda = a_cs;
198 inca = a_rs;
199
200 // An optimization: if A is row-major, then let's access the matrix
201 // by rows instead of by columns to increase spatial locality.
202 if ( bl1_is_row_storage( a_rs, a_cs ) )
203 {
206 }
207 }
208
210
211 for ( j = 0; j < n_iter; j++ )
212 {
213 a_begin = a + j*lda;
214
216 &alpha_inv,
217 a_begin, inca );
218 }
219}
int i
Definition bl1_axmyv2.c:145
void bl1_cscal(int n, scomplex *alpha, scomplex *x, int incx)
Definition bl1_scal.c:52
int bl1_is_row_storage(int rs, int cs)
Definition bl1_is.c:95
int bl1_is_vector(int m, int n)
Definition bl1_is.c:106
int bl1_vector_dim(int m, int n)
Definition bl1_vector.c:13
int bl1_vector_inc(trans1_t trans, int m, int n, int rs, int cs)
Definition bl1_vector.c:19
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
void bl1_cinvert2s(conj1_t conj, scomplex *alpha, scomplex *beta)
Definition bl1_invert2s.c:27
@ BLIS1_NO_TRANSPOSE
Definition blis_type_defs.h:54
Definition blis_type_defs.h:133

References bl1_cinvert2s(), bl1_cscal(), bl1_is_row_storage(), bl1_is_vector(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().

◆ bl1_csinvscalm()

void bl1_csinvscalm ( conj1_t  conj,
int  m,
int  n,
float alpha,
scomplex a,
int  a_rs,
int  a_cs 
)
118{
119 float alpha_inv;
121 int lda, inca;
122 int n_iter;
123 int n_elem;
124 int j;
125
126 // Return early if possible.
127 if ( bl1_zero_dim2( m, n ) ) return;
128 if ( bl1_seq1( alpha ) ) return;
129
130 // Handle cases where A is a vector to ensure that the underlying axpy
131 // gets invoked only once.
132 if ( bl1_is_vector( m, n ) )
133 {
134 // Initialize with values appropriate for a vector.
135 n_iter = 1;
136 n_elem = bl1_vector_dim( m, n );
137 lda = 1; // multiplied by zero when n_iter == 1; not needed.
139 }
140 else // matrix case
141 {
142 // Initialize with optimal values for column-major storage.
143 n_iter = n;
144 n_elem = m;
145 lda = a_cs;
146 inca = a_rs;
147
148 // An optimization: if A is row-major, then let's access the matrix
149 // by rows instead of by columns to increase spatial locality.
150 if ( bl1_is_row_storage( a_rs, a_cs ) )
151 {
154 }
155 }
156
158
159 for ( j = 0; j < n_iter; j++ )
160 {
161 a_begin = a + j*lda;
162
164 &alpha_inv,
165 a_begin, inca );
166 }
167}
void bl1_csscal(int n, float *alpha, scomplex *x, int incx)
Definition bl1_scal.c:39
void bl1_sinvert2s(conj1_t conj, float *alpha, float *beta)
Definition bl1_invert2s.c:13

References bl1_csscal(), bl1_is_row_storage(), bl1_is_vector(), bl1_sinvert2s(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().

◆ bl1_dinvscalm()

void bl1_dinvscalm ( conj1_t  conj,
int  m,
int  n,
double alpha,
double a,
int  a_rs,
int  a_cs 
)
66{
67 double alpha_inv;
68 double* a_begin;
69 int lda, inca;
70 int n_iter;
71 int n_elem;
72 int j;
73
74 // Return early if possible.
75 if ( bl1_zero_dim2( m, n ) ) return;
76 if ( bl1_deq1( alpha ) ) return;
77
78 // Handle cases where A is a vector to ensure that the underlying axpy
79 // gets invoked only once.
80 if ( bl1_is_vector( m, n ) )
81 {
82 // Initialize with values appropriate for a vector.
83 n_iter = 1;
84 n_elem = bl1_vector_dim( m, n );
85 lda = 1; // multiplied by zero when n_iter == 1; not needed.
87 }
88 else // matrix case
89 {
90 // Initialize with optimal values for column-major storage.
91 n_iter = n;
92 n_elem = m;
93 lda = a_cs;
94 inca = a_rs;
95
96 // An optimization: if A is row-major, then let's access the matrix
97 // by rows instead of by columns to increase spatial locality.
99 {
102 }
103 }
104
106
107 for ( j = 0; j < n_iter; j++ )
108 {
109 a_begin = a + j*lda;
110
112 &alpha_inv,
113 a_begin, inca );
114 }
115}
void bl1_dscal(int n, double *alpha, double *x, int incx)
Definition bl1_scal.c:26
void bl1_dinvert2s(conj1_t conj, double *alpha, double *beta)
Definition bl1_invert2s.c:20

References bl1_dinvert2s(), bl1_dscal(), bl1_is_row_storage(), bl1_is_vector(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().

◆ bl1_sinvscalm()

void bl1_sinvscalm ( conj1_t  conj,
int  m,
int  n,
float alpha,
float a,
int  a_rs,
int  a_cs 
)
14{
15 float alpha_inv;
16 float* a_begin;
17 int lda, inca;
18 int n_iter;
19 int n_elem;
20 int j;
21
22 // Return early if possible.
23 if ( bl1_zero_dim2( m, n ) ) return;
24 if ( bl1_seq1( alpha ) ) return;
25
26 // Handle cases where A is a vector to ensure that the underlying axpy
27 // gets invoked only once.
28 if ( bl1_is_vector( m, n ) )
29 {
30 // Initialize with values appropriate for a vector.
31 n_iter = 1;
32 n_elem = bl1_vector_dim( m, n );
33 lda = 1; // multiplied by zero when n_iter == 1; not needed.
35 }
36 else // matrix case
37 {
38 // Initialize with optimal values for column-major storage.
39 n_iter = n;
40 n_elem = m;
41 lda = a_cs;
42 inca = a_rs;
43
44 // An optimization: if A is row-major, then let's access the matrix
45 // by rows instead of by columns to increase spatial locality.
47 {
50 }
51 }
52
54
55 for ( j = 0; j < n_iter; j++ )
56 {
57 a_begin = a + j*lda;
58
60 &alpha_inv,
61 a_begin, inca );
62 }
63}
void bl1_sscal(int n, float *alpha, float *x, int incx)
Definition bl1_scal.c:13

References bl1_is_row_storage(), bl1_is_vector(), bl1_sinvert2s(), bl1_sscal(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().

◆ bl1_zdinvscalm()

void bl1_zdinvscalm ( conj1_t  conj,
int  m,
int  n,
double alpha,
dcomplex a,
int  a_rs,
int  a_cs 
)
222{
223 double alpha_inv;
225 int lda, inca;
226 int n_iter;
227 int n_elem;
228 int j;
229
230 // Return early if possible.
231 if ( bl1_zero_dim2( m, n ) ) return;
232 if ( bl1_deq1( alpha ) ) return;
233
234 // Handle cases where A is a vector to ensure that the underlying axpy
235 // gets invoked only once.
236 if ( bl1_is_vector( m, n ) )
237 {
238 // Initialize with values appropriate for a vector.
239 n_iter = 1;
240 n_elem = bl1_vector_dim( m, n );
241 lda = 1; // multiplied by zero when n_iter == 1; not needed.
243 }
244 else // matrix case
245 {
246 // Initialize with optimal values for column-major storage.
247 n_iter = n;
248 n_elem = m;
249 lda = a_cs;
250 inca = a_rs;
251
252 // An optimization: if A is row-major, then let's access the matrix
253 // by rows instead of by columns to increase spatial locality.
254 if ( bl1_is_row_storage( a_rs, a_cs ) )
255 {
258 }
259 }
260
262
263 for ( j = 0; j < n_iter; j++ )
264 {
265 a_begin = a + j*lda;
266
268 &alpha_inv,
269 a_begin, inca );
270 }
271}
void bl1_zdscal(int n, double *alpha, dcomplex *x, int incx)
Definition bl1_scal.c:65
Definition blis_type_defs.h:138

References bl1_dinvert2s(), bl1_is_row_storage(), bl1_is_vector(), bl1_vector_dim(), bl1_vector_inc(), bl1_zdscal(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().

◆ bl1_zinvscalm()

void bl1_zinvscalm ( conj1_t  conj,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs 
)
274{
277 int lda, inca;
278 int n_iter;
279 int n_elem;
280 int j;
281
282 // Return early if possible.
283 if ( bl1_zero_dim2( m, n ) ) return;
284 if ( bl1_zeq1( alpha ) ) return;
285
286 // Handle cases where A is a vector to ensure that the underlying axpy
287 // gets invoked only once.
288 if ( bl1_is_vector( m, n ) )
289 {
290 // Initialize with values appropriate for a vector.
291 n_iter = 1;
292 n_elem = bl1_vector_dim( m, n );
293 lda = 1; // multiplied by zero when n_iter == 1; not needed.
295 }
296 else // matrix case
297 {
298 // Initialize with optimal values for column-major storage.
299 n_iter = n;
300 n_elem = m;
301 lda = a_cs;
302 inca = a_rs;
303
304 // An optimization: if A is row-major, then let's access the matrix
305 // by rows instead of by columns to increase spatial locality.
306 if ( bl1_is_row_storage( a_rs, a_cs ) )
307 {
310 }
311 }
312
314
315 for ( j = 0; j < n_iter; j++ )
316 {
317 a_begin = a + j*lda;
318
320 &alpha_inv,
321 a_begin, inca );
322 }
323}
void bl1_zscal(int n, dcomplex *alpha, dcomplex *x, int incx)
Definition bl1_scal.c:78
void bl1_zinvert2s(conj1_t conj, dcomplex *alpha, dcomplex *beta)
Definition bl1_invert2s.c:44

References bl1_is_row_storage(), bl1_is_vector(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), bl1_zinvert2s(), bl1_zscal(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Inv_scal_external(), and FLA_Inv_scalc_external().