libflame revision_anchor
Functions
bl1_scalmr.c File Reference

(r)

Functions

void bl1_sscalmr (uplo1_t uplo, int m, int n, float *alpha, float *a, int a_rs, int a_cs)
 
void bl1_dscalmr (uplo1_t uplo, int m, int n, double *alpha, double *a, int a_rs, int a_cs)
 
void bl1_csscalmr (uplo1_t uplo, int m, int n, float *alpha, scomplex *a, int a_rs, int a_cs)
 
void bl1_cscalmr (uplo1_t uplo, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs)
 
void bl1_zdscalmr (uplo1_t uplo, int m, int n, double *alpha, dcomplex *a, int a_rs, int a_cs)
 
void bl1_zscalmr (uplo1_t uplo, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs)
 

Function Documentation

◆ bl1_cscalmr()

void bl1_cscalmr ( uplo1_t  uplo,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs 
)
182{
184 int lda, inca;
185 int n_iter;
186 int n_elem_max;
187 int n_elem;
188 int j;
189
190 // Return early if possible.
191 if ( bl1_zero_dim2( m, n ) ) return;
192 if ( bl1_ceq1( alpha ) ) return;
193
194 // We initialize for column-major.
195 n_iter = n;
196 n_elem_max = 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 bl1_toggle_uplo( uplo );
207 }
208
209 if ( bl1_is_upper( uplo ) )
210 {
211 for ( j = 0; j < n_iter; j++ )
212 {
213 n_elem = bl1_min( j + 1, n_elem_max );
214 a_begin = a + j*lda;
215
217 alpha,
218 a_begin, inca );
219 }
220 }
221 else // if ( bl1_is_lower( uplo ) )
222 {
223 for ( j = 0; j < n_iter; j++ )
224 {
225 n_elem = bl1_max( 0, n_elem_max - j );
226 a_begin = a + j*lda + j*inca;
227
228 if ( n_elem <= 0 ) break;
229
231 alpha,
232 a_begin, inca );
233 }
234 }
235}
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_upper(uplo1_t uplo)
Definition bl1_is.c:54
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
Definition blis_type_defs.h:133

References bl1_cscal(), bl1_is_row_storage(), bl1_is_upper(), and bl1_zero_dim2().

Referenced by FLA_Scalr_external().

◆ bl1_csscalmr()

void bl1_csscalmr ( uplo1_t  uplo,
int  m,
int  n,
float alpha,
scomplex a,
int  a_rs,
int  a_cs 
)
126{
128 int lda, inca;
129 int n_iter;
130 int n_elem_max;
131 int n_elem;
132 int j;
133
134 // Return early if possible.
135 if ( bl1_zero_dim2( m, n ) ) return;
136 if ( bl1_seq1( alpha ) ) return;
137
138 // We initialize for column-major.
139 n_iter = n;
140 n_elem_max = m;
141 lda = a_cs;
142 inca = a_rs;
143
144 // An optimization: if A is row-major, then let's access the matrix
145 // by rows instead of by columns to increase spatial locality.
146 if ( bl1_is_row_storage( a_rs, a_cs ) )
147 {
150 bl1_toggle_uplo( uplo );
151 }
152
153 if ( bl1_is_upper( uplo ) )
154 {
155 for ( j = 0; j < n_iter; j++ )
156 {
157 n_elem = bl1_min( j + 1, n_elem_max );
158 a_begin = a + j*lda;
159
161 alpha,
162 a_begin, inca );
163 }
164 }
165 else // if ( bl1_is_lower( uplo ) )
166 {
167 for ( j = 0; j < n_iter; j++ )
168 {
169 n_elem = bl1_max( 0, n_elem_max - j );
170 a_begin = a + j*lda + j*inca;
171
172 if ( n_elem <= 0 ) break;
173
175 alpha,
176 a_begin, inca );
177 }
178 }
179}
void bl1_csscal(int n, float *alpha, scomplex *x, int incx)
Definition bl1_scal.c:39

References bl1_csscal(), bl1_is_row_storage(), bl1_is_upper(), and bl1_zero_dim2().

Referenced by bl1_cher2k(), bl1_cherk(), and FLA_Scalr_external().

◆ bl1_dscalmr()

void bl1_dscalmr ( uplo1_t  uplo,
int  m,
int  n,
double alpha,
double a,
int  a_rs,
int  a_cs 
)
70{
71 double* a_begin;
72 int lda, inca;
73 int n_iter;
74 int n_elem_max;
75 int n_elem;
76 int j;
77
78 // Return early if possible.
79 if ( bl1_zero_dim2( m, n ) ) return;
80 if ( bl1_deq1( alpha ) ) return;
81
82 // We initialize for column-major.
83 n_iter = n;
84 n_elem_max = m;
85 lda = a_cs;
86 inca = a_rs;
87
88 // An optimization: if A is row-major, then let's access the matrix
89 // by rows instead of by columns to increase spatial locality.
91 {
94 bl1_toggle_uplo( uplo );
95 }
96
97 if ( bl1_is_upper( uplo ) )
98 {
99 for ( j = 0; j < n_iter; j++ )
100 {
101 n_elem = bl1_min( j + 1, n_elem_max );
102 a_begin = a + j*lda;
103
105 alpha,
106 a_begin, inca );
107 }
108 }
109 else // if ( bl1_is_lower( uplo ) )
110 {
111 for ( j = 0; j < n_iter; j++ )
112 {
113 n_elem = bl1_max( 0, n_elem_max - j );
114 a_begin = a + j*lda + j*inca;
115
116 if ( n_elem <= 0 ) break;
117
119 alpha,
120 a_begin, inca );
121 }
122 }
123}
void bl1_dscal(int n, double *alpha, double *x, int incx)
Definition bl1_scal.c:26

References bl1_dscal(), bl1_is_row_storage(), bl1_is_upper(), and bl1_zero_dim2().

Referenced by FLA_Scalr_external().

◆ bl1_sscalmr()

void bl1_sscalmr ( uplo1_t  uplo,
int  m,
int  n,
float alpha,
float a,
int  a_rs,
int  a_cs 
)
14{
15 float* a_begin;
16 int lda, inca;
17 int n_iter;
18 int n_elem_max;
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 // We initialize for column-major.
27 n_iter = n;
28 n_elem_max = m;
29 lda = a_cs;
30 inca = a_rs;
31
32 // An optimization: if A is row-major, then let's access the matrix
33 // by rows instead of by columns to increase spatial locality.
35 {
38 bl1_toggle_uplo( uplo );
39 }
40
41 if ( bl1_is_upper( uplo ) )
42 {
43 for ( j = 0; j < n_iter; j++ )
44 {
45 n_elem = bl1_min( j + 1, n_elem_max );
46 a_begin = a + j*lda;
47
49 alpha,
50 a_begin, inca );
51 }
52 }
53 else // if ( bl1_is_lower( uplo ) )
54 {
55 for ( j = 0; j < n_iter; j++ )
56 {
57 n_elem = bl1_max( 0, n_elem_max - j );
58 a_begin = a + j*lda + j*inca;
59
60 if ( n_elem <= 0 ) break;
61
63 alpha,
64 a_begin, inca );
65 }
66 }
67}
void bl1_sscal(int n, float *alpha, float *x, int incx)
Definition bl1_scal.c:13

References bl1_is_row_storage(), bl1_is_upper(), bl1_sscal(), and bl1_zero_dim2().

Referenced by FLA_Scalr_external().

◆ bl1_zdscalmr()

void bl1_zdscalmr ( uplo1_t  uplo,
int  m,
int  n,
double alpha,
dcomplex a,
int  a_rs,
int  a_cs 
)
238{
240 int lda, inca;
241 int n_iter;
242 int n_elem_max;
243 int n_elem;
244 int j;
245
246 // Return early if possible.
247 if ( bl1_zero_dim2( m, n ) ) return;
248 if ( bl1_deq1( alpha ) ) return;
249
250 // We initialize for column-major.
251 n_iter = n;
252 n_elem_max = m;
253 lda = a_cs;
254 inca = a_rs;
255
256 // An optimization: if A is row-major, then let's access the matrix
257 // by rows instead of by columns to increase spatial locality.
258 if ( bl1_is_row_storage( a_rs, a_cs ) )
259 {
262 bl1_toggle_uplo( uplo );
263 }
264
265 if ( bl1_is_upper( uplo ) )
266 {
267 for ( j = 0; j < n_iter; j++ )
268 {
269 n_elem = bl1_min( j + 1, n_elem_max );
270 a_begin = a + j*lda;
271
273 alpha,
274 a_begin, inca );
275 }
276 }
277 else // if ( bl1_is_lower( uplo ) )
278 {
279 for ( j = 0; j < n_iter; j++ )
280 {
281 n_elem = bl1_max( 0, n_elem_max - j );
282 a_begin = a + j*lda + j*inca;
283
284 if ( n_elem <= 0 ) break;
285
287 alpha,
288 a_begin, inca );
289 }
290 }
291}
void bl1_zdscal(int n, double *alpha, dcomplex *x, int incx)
Definition bl1_scal.c:65
Definition blis_type_defs.h:138

References bl1_is_row_storage(), bl1_is_upper(), bl1_zdscal(), and bl1_zero_dim2().

Referenced by bl1_zher2k(), bl1_zherk(), and FLA_Scalr_external().

◆ bl1_zscalmr()

void bl1_zscalmr ( uplo1_t  uplo,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs 
)
294{
296 int lda, inca;
297 int n_iter;
298 int n_elem_max;
299 int n_elem;
300 int j;
301
302 // Return early if possible.
303 if ( bl1_zero_dim2( m, n ) ) return;
304 if ( bl1_zeq1( alpha ) ) return;
305
306 // We initialize for column-major.
307 n_iter = n;
308 n_elem_max = m;
309 lda = a_cs;
310 inca = a_rs;
311
312 // An optimization: if A is row-major, then let's access the matrix
313 // by rows instead of by columns to increase spatial locality.
314 if ( bl1_is_row_storage( a_rs, a_cs ) )
315 {
318 bl1_toggle_uplo( uplo );
319 }
320
321 if ( bl1_is_upper( uplo ) )
322 {
323 for ( j = 0; j < n_iter; j++ )
324 {
325 n_elem = bl1_min( j + 1, n_elem_max );
326 a_begin = a + j*lda;
327
329 alpha,
330 a_begin, inca );
331 }
332 }
333 else // if ( bl1_is_lower( uplo ) )
334 {
335 for ( j = 0; j < n_iter; j++ )
336 {
337 n_elem = bl1_max( 0, n_elem_max - j );
338 a_begin = a + j*lda + j*inca;
339
340 if ( n_elem <= 0 ) break;
341
343 alpha,
344 a_begin, inca );
345 }
346 }
347}
void bl1_zscal(int n, dcomplex *alpha, dcomplex *x, int incx)
Definition bl1_scal.c:78

References bl1_is_row_storage(), bl1_is_upper(), bl1_zero_dim2(), and bl1_zscal().

Referenced by FLA_Scalr_external().