libflame revision_anchor
Functions
bl1_ewscalmt.c File Reference

(r)

Functions

void bl1_sewscalmt (trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
 
void bl1_dewscalmt (trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
 
void bl1_csewscalmt (trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_cewscalmt (trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
 
void bl1_zdewscalmt (trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 
void bl1_zewscalmt (trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
 

Function Documentation

◆ bl1_cewscalmt()

void bl1_cewscalmt ( trans1_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
230{
233 int lda, inca;
234 int ldb, incb;
235 int n_iter;
236 int n_elem;
237 int j;
239
240 // Return early if possible.
241 if ( bl1_zero_dim2( m, n ) ) return;
242
243 // Handle cases where A and B are vectors to ensure that the underlying ewscal
244 // gets invoked only once.
245 if ( bl1_is_vector( m, n ) )
246 {
247 // Initialize with values appropriate for vectors.
248 n_iter = 1;
249 n_elem = bl1_vector_dim( m, n );
250 lda = 1; // multiplied by zero when n_iter == 1; not needed.
251 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
252 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
254 }
255 else // matrix case
256 {
257 // Initialize with optimal values for column-major storage.
258 n_iter = n;
259 n_elem = m;
260 lda = a_cs;
261 inca = a_rs;
262 ldb = b_cs;
263 incb = b_rs;
264
265 // Handle the transposition of A.
266 if ( bl1_does_trans( trans ) )
267 {
269 }
270
271 // An optimization: if B is row-major and if A is effectively row-major
272 // after a possible transposition, then let's access the matrices by rows
273 // instead of by columns for increased spatial locality.
274 if ( bl1_is_row_storage( b_rs, b_cs ) )
275 {
276 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
278 {
282 }
283 }
284 }
285
286 // Extract conj component from trans parameter.
288
289 for ( j = 0; j < n_iter; j++ )
290 {
291 a_begin = a + j*lda;
292 b_begin = b + j*ldb;
293
295 n_elem,
296 a_begin, inca,
297 b_begin, incb );
298 }
299}
int i
Definition bl1_axmyv2.c:145
int bl1_does_notrans(trans1_t trans)
Definition bl1_does.c:19
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_is_col_storage(int rs, int cs)
Definition bl1_is.c:90
conj1_t bl1_proj_trans1_to_conj(trans1_t trans)
Definition bl1_proj.c:13
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
int bl1_does_trans(trans1_t trans)
Definition bl1_does.c:13
void bl1_cewscalv(conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_ewscalv.c:58
@ BLIS1_NO_TRANSPOSE
Definition blis_type_defs.h:54
conj1_t
Definition blis_type_defs.h:80
Definition blis_type_defs.h:133

References bl1_cewscalv(), bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Scal_elemwise().

◆ bl1_csewscalmt()

void bl1_csewscalmt ( trans1_t  trans,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)
158{
159 float* a_begin;
161 int lda, inca;
162 int ldb, incb;
163 int n_iter;
164 int n_elem;
165 int j;
167
168 // Return early if possible.
169 if ( bl1_zero_dim2( m, n ) ) return;
170
171 // Handle cases where A and B are vectors to ensure that the underlying ewscal
172 // gets invoked only once.
173 if ( bl1_is_vector( m, n ) )
174 {
175 // Initialize with values appropriate for vectors.
176 n_iter = 1;
177 n_elem = bl1_vector_dim( m, n );
178 lda = 1; // multiplied by zero when n_iter == 1; not needed.
179 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
180 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
182 }
183 else // matrix case
184 {
185 // Initialize with optimal values for column-major storage.
186 n_iter = n;
187 n_elem = m;
188 lda = a_cs;
189 inca = a_rs;
190 ldb = b_cs;
191 incb = b_rs;
192
193 // Handle the transposition of A.
194 if ( bl1_does_trans( trans ) )
195 {
197 }
198
199 // An optimization: if B is row-major and if A is effectively row-major
200 // after a possible transposition, then let's access the matrices by rows
201 // instead of by columns for increased spatial locality.
202 if ( bl1_is_row_storage( b_rs, b_cs ) )
203 {
204 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
206 {
210 }
211 }
212 }
213
214 // Extract conj component from trans parameter.
216
217 for ( j = 0; j < n_iter; j++ )
218 {
219 a_begin = a + j*lda;
220 b_begin = b + j*ldb;
221
223 n_elem,
224 a_begin, inca,
225 b_begin, incb );
226 }
227}
void bl1_csewscalv(conj1_t conj, int n, float *x, int incx, scomplex *y, int incy)
Definition bl1_ewscalv.c:43

References bl1_csewscalv(), bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

◆ bl1_dewscalmt()

void bl1_dewscalmt ( trans1_t  trans,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
double b,
int  b_rs,
int  b_cs 
)
86{
87 double* a_begin;
88 double* b_begin;
89 int lda, inca;
90 int ldb, incb;
91 int n_iter;
92 int n_elem;
93 int j;
95
96 // Return early if possible.
97 if ( bl1_zero_dim2( m, n ) ) return;
98
99 // Handle cases where A and B are vectors to ensure that the underlying ewscal
100 // gets invoked only once.
101 if ( bl1_is_vector( m, n ) )
102 {
103 // Initialize with values appropriate for vectors.
104 n_iter = 1;
105 n_elem = bl1_vector_dim( m, n );
106 lda = 1; // multiplied by zero when n_iter == 1; not needed.
107 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
108 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
110 }
111 else // matrix case
112 {
113 // Initialize with optimal values for column-major storage.
114 n_iter = n;
115 n_elem = m;
116 lda = a_cs;
117 inca = a_rs;
118 ldb = b_cs;
119 incb = b_rs;
120
121 // Handle the transposition of A.
122 if ( bl1_does_trans( trans ) )
123 {
125 }
126
127 // An optimization: if B is row-major and if A is effectively row-major
128 // after a possible transposition, then let's access the matrices by rows
129 // instead of by columns for increased spatial locality.
130 if ( bl1_is_row_storage( b_rs, b_cs ) )
131 {
132 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
134 {
138 }
139 }
140 }
141
142 // Extract conj component from trans parameter.
144
145 for ( j = 0; j < n_iter; j++ )
146 {
147 a_begin = a + j*lda;
148 b_begin = b + j*ldb;
149
151 n_elem,
152 a_begin, inca,
153 b_begin, incb );
154 }
155}
void bl1_dewscalv(conj1_t conj, int n, double *x, int incx, double *y, int incy)
Definition bl1_ewscalv.c:28

References bl1_dewscalv(), bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Scal_elemwise().

◆ bl1_sewscalmt()

void bl1_sewscalmt ( trans1_t  trans,
int  m,
int  n,
float a,
int  a_rs,
int  a_cs,
float b,
int  b_rs,
int  b_cs 
)
14{
15 float* a_begin;
16 float* b_begin;
17 int lda, inca;
18 int ldb, incb;
19 int n_iter;
20 int n_elem;
21 int j;
23
24 // Return early if possible.
25 if ( bl1_zero_dim2( m, n ) ) return;
26
27 // Handle cases where A and B are vectors to ensure that the underlying ewscal
28 // gets invoked only once.
29 if ( bl1_is_vector( m, n ) )
30 {
31 // Initialize with values appropriate for vectors.
32 n_iter = 1;
33 n_elem = bl1_vector_dim( m, n );
34 lda = 1; // multiplied by zero when n_iter == 1; not needed.
35 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
36 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
38 }
39 else // matrix case
40 {
41 // Initialize with optimal values for column-major storage.
42 n_iter = n;
43 n_elem = m;
44 lda = a_cs;
45 inca = a_rs;
46 ldb = b_cs;
47 incb = b_rs;
48
49 // Handle the transposition of A.
50 if ( bl1_does_trans( trans ) )
51 {
53 }
54
55 // An optimization: if B is row-major and if A is effectively row-major
56 // after a possible transposition, then let's access the matrices by rows
57 // instead of by columns for increased spatial locality.
59 {
60 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
62 {
66 }
67 }
68 }
69
70 // Extract conj component from trans parameter.
72
73 for ( j = 0; j < n_iter; j++ )
74 {
75 a_begin = a + j*lda;
76 b_begin = b + j*ldb;
77
79 n_elem,
80 a_begin, inca,
81 b_begin, incb );
82 }
83}
void bl1_sewscalv(conj1_t conj, int n, float *x, int incx, float *y, int incy)
Definition bl1_ewscalv.c:13

References bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_sewscalv(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Scal_elemwise().

◆ bl1_zdewscalmt()

void bl1_zdewscalmt ( trans1_t  trans,
int  m,
int  n,
double a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
302{
303 double* a_begin;
305 int lda, inca;
306 int ldb, incb;
307 int n_iter;
308 int n_elem;
309 int j;
311
312 // Return early if possible.
313 if ( bl1_zero_dim2( m, n ) ) return;
314
315 // Handle cases where A and B are vectors to ensure that the underlying ewscal
316 // gets invoked only once.
317 if ( bl1_is_vector( m, n ) )
318 {
319 // Initialize with values appropriate for vectors.
320 n_iter = 1;
321 n_elem = bl1_vector_dim( m, n );
322 lda = 1; // multiplied by zero when n_iter == 1; not needed.
323 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
324 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
326 }
327 else // matrix case
328 {
329 // Initialize with optimal values for column-major storage.
330 n_iter = n;
331 n_elem = m;
332 lda = a_cs;
333 inca = a_rs;
334 ldb = b_cs;
335 incb = b_rs;
336
337 // Handle the transposition of A.
338 if ( bl1_does_trans( trans ) )
339 {
341 }
342
343 // An optimization: if B is row-major and if A is effectively row-major
344 // after a possible transposition, then let's access the matrices by rows
345 // instead of by columns for increased spatial locality.
346 if ( bl1_is_row_storage( b_rs, b_cs ) )
347 {
348 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
350 {
354 }
355 }
356 }
357
358 // Extract conj component from trans parameter.
360
361 for ( j = 0; j < n_iter; j++ )
362 {
363 a_begin = a + j*lda;
364 b_begin = b + j*ldb;
365
367 n_elem,
368 a_begin, inca,
369 b_begin, incb );
370 }
371}
void bl1_zdewscalv(conj1_t conj, int n, double *x, int incx, dcomplex *y, int incy)
Definition bl1_ewscalv.c:88
Definition blis_type_defs.h:138

References bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_vector_dim(), bl1_vector_inc(), bl1_zdewscalv(), bl1_zero_dim2(), and BLIS1_NO_TRANSPOSE.

◆ bl1_zewscalmt()

void bl1_zewscalmt ( trans1_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)
374{
377 int lda, inca;
378 int ldb, incb;
379 int n_iter;
380 int n_elem;
381 int j;
383
384 // Return early if possible.
385 if ( bl1_zero_dim2( m, n ) ) return;
386
387 // Handle cases where A and B are vectors to ensure that the underlying ewscal
388 // gets invoked only once.
389 if ( bl1_is_vector( m, n ) )
390 {
391 // Initialize with values appropriate for vectors.
392 n_iter = 1;
393 n_elem = bl1_vector_dim( m, n );
394 lda = 1; // multiplied by zero when n_iter == 1; not needed.
395 inca = bl1_vector_inc( trans, m, n, a_rs, a_cs );
396 ldb = 1; // multiplied by zero when n_iter == 1; not needed.
398 }
399 else // matrix case
400 {
401 // Initialize with optimal values for column-major storage.
402 n_iter = n;
403 n_elem = m;
404 lda = a_cs;
405 inca = a_rs;
406 ldb = b_cs;
407 incb = b_rs;
408
409 // Handle the transposition of A.
410 if ( bl1_does_trans( trans ) )
411 {
413 }
414
415 // An optimization: if B is row-major and if A is effectively row-major
416 // after a possible transposition, then let's access the matrices by rows
417 // instead of by columns for increased spatial locality.
418 if ( bl1_is_row_storage( b_rs, b_cs ) )
419 {
420 if ( ( bl1_is_col_storage( a_rs, a_cs ) && bl1_does_trans( trans ) ) ||
422 {
426 }
427 }
428 }
429
430 // Extract conj component from trans parameter.
432
433 for ( j = 0; j < n_iter; j++ )
434 {
435 a_begin = a + j*lda;
436 b_begin = b + j*ldb;
437
439 n_elem,
440 a_begin, inca,
441 b_begin, incb );
442 }
443}
void bl1_zewscalv(conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_ewscalv.c:103

References bl1_does_notrans(), bl1_does_trans(), bl1_is_col_storage(), bl1_is_row_storage(), bl1_is_vector(), bl1_proj_trans1_to_conj(), bl1_vector_dim(), bl1_vector_inc(), bl1_zero_dim2(), bl1_zewscalv(), and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Scal_elemwise().