libflame revision_anchor
bl1_syrk.c File Reference

(r)

Functions

void bl1_ssyrk (uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int a_rs, int a_cs, float *beta, float *c, int c_rs, int c_cs)
 
void bl1_dsyrk (uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int a_rs, int a_cs, double *beta, double *c, int c_rs, int c_cs)
 
void bl1_csyrk (uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
 
void bl1_zsyrk (uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
 
void bl1_ssyrk_blas (uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int lda, float *beta, float *c, int ldc)
 
void bl1_dsyrk_blas (uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int lda, double *beta, double *c, int ldc)
 
void bl1_csyrk_blas (uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int lda, scomplex *beta, scomplex *c, int ldc)
 
void bl1_zsyrk_blas (uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int lda, dcomplex *beta, dcomplex *c, int ldc)
 

Function Documentation

◆ bl1_csyrk()

void bl1_csyrk ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
scomplex * alpha,
scomplex * a,
int a_rs,
int a_cs,
scomplex * beta,
scomplex * c,
int c_rs,
int c_cs )
206{
207 uplo1_t uplo_save = uplo;
208 int m_save = m;
209 scomplex* a_save = a;
210 scomplex* c_save = c;
211 int a_rs_save = a_rs;
212 int a_cs_save = a_cs;
213 int c_rs_save = c_rs;
214 int c_cs_save = c_cs;
215 int lda, inca;
216 int ldc, incc;
217
218 // Return early if possible.
219 if ( bl1_zero_dim2( m, k ) ) return;
220
221 // If necessary, allocate, initialize, and use a temporary contiguous
222 // copy of each matrix rather than the original matrices.
224 m,
225 k,
226 a_save, a_rs_save, a_cs_save,
227 &a, &a_rs, &a_cs );
228
230 m,
231 m,
232 c_save, c_rs_save, c_cs_save,
233 &c, &c_rs, &c_cs );
234
235 // Initialize with values assuming column-major storage.
236 lda = a_cs;
237 inca = a_rs;
238 ldc = c_cs;
239 incc = c_rs;
240
241 // Adjust the parameters based on the storage of each matrix.
242 if ( bl1_is_col_storage( c_rs, c_cs ) )
243 {
244 if ( bl1_is_col_storage( a_rs, a_cs ) )
245 {
246 // requested operation: uplo( C_c ) += A_c * A_c^T
247 // effective operation: uplo( C_c ) += A_c * A_c^T
248 }
249 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
250 {
251 // requested operation: uplo( C_c ) += A_r * A_r^T
252 // effective operation: uplo( C_c ) += A_c^T * A_c
253 bl1_swap_ints( lda, inca );
254
255 bl1_toggle_trans( trans );
256 }
257 }
258 else // if ( bl1_is_row_storage( c_rs, c_cs ) )
259 {
260 if ( bl1_is_col_storage( a_rs, a_cs ) )
261 {
262 // requested operation: uplo( C_r ) += A_c * A_c^T
263 // effective operation: ~uplo( C_c ) += A_c * A_c^T
264 bl1_swap_ints( ldc, incc );
265
266 bl1_toggle_uplo( uplo );
267 }
268 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
269 {
270 // requested operation: uplo( C_r ) += A_r * A_r^T
271 // effective operation: ~uplo( C_c ) += A_c^T * A_c
272 bl1_swap_ints( ldc, incc );
273 bl1_swap_ints( lda, inca );
274
275 bl1_toggle_uplo( uplo );
276 bl1_toggle_trans( trans );
277 }
278 }
279
280 bl1_csyrk_blas( uplo,
281 trans,
282 m,
283 k,
284 alpha,
285 a, lda,
286 beta,
287 c, ldc );
288
289 // Free any temporary contiguous matrices, copying the result back to
290 // the original matrix.
291 bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
292 &a, &a_rs, &a_cs );
293
294 bl1_cfree_saved_contigmr( uplo_save,
295 m_save,
296 m_save,
297 c_save, c_rs_save, c_cs_save,
298 &c, &c_rs, &c_cs );
299}
void bl1_csyrk_blas(uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int lda, scomplex *beta, scomplex *c, int ldc)
Definition bl1_syrk.c:473
int bl1_is_col_storage(int rs, int cs)
Definition bl1_is.c:90
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
void bl1_cfree_contigm(scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:45
void bl1_cfree_saved_contigmr(uplo1_t uplo, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigmr.c:59
void bl1_ccreate_contigmr(uplo1_t uplo, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:77
void bl1_ccreate_contigmt(trans1_t trans_dims, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmt.c:89
uplo1_t
Definition blis_type_defs.h:61
Definition blis_type_defs.h:133

References bl1_ccreate_contigmr(), bl1_ccreate_contigmt(), bl1_cfree_contigm(), bl1_cfree_saved_contigmr(), bl1_csyrk_blas(), bl1_is_col_storage(), and bl1_zero_dim2().

Referenced by FLA_Syrk_external().

◆ bl1_csyrk_blas()

void bl1_csyrk_blas ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
scomplex * alpha,
scomplex * a,
int lda,
scomplex * beta,
scomplex * c,
int ldc )
474{
475#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
476 enum CBLAS_ORDER cblas_order = CblasColMajor;
477 enum CBLAS_UPLO cblas_uplo;
478 enum CBLAS_TRANSPOSE cblas_trans;
479
480 bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
481 bl1_param_map_to_netlib_trans( trans, &cblas_trans );
482
483 cblas_csyrk( cblas_order,
484 cblas_uplo,
485 cblas_trans,
486 m,
487 k,
488 alpha,
489 a, lda,
490 beta,
491 c, ldc );
492#else
493 char blas_uplo;
494 char blas_trans;
495
496 bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
497 bl1_param_map_to_netlib_trans( trans, &blas_trans );
498
499 F77_csyrk( &blas_uplo,
500 &blas_trans,
501 &m,
502 &k,
503 alpha,
504 a, &lda,
505 beta,
506 c, &ldc );
507#endif
508}
void F77_csyrk(char *uplo, char *transa, int *n, int *k, scomplex *alpha, scomplex *a, int *lda, scomplex *beta, scomplex *c, int *ldc)
CBLAS_ORDER
Definition blis_prototypes_cblas.h:17
@ CblasColMajor
Definition blis_prototypes_cblas.h:17
CBLAS_UPLO
Definition blis_prototypes_cblas.h:19
CBLAS_TRANSPOSE
Definition blis_prototypes_cblas.h:18
void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition bl1_param_map.c:15
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition bl1_param_map.c:47

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_csyrk(), CblasColMajor, and F77_csyrk().

Referenced by bl1_csyrk().

◆ bl1_dsyrk()

void bl1_dsyrk ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
double * alpha,
double * a,
int a_rs,
int a_cs,
double * beta,
double * c,
int c_rs,
int c_cs )
110{
111 uplo1_t uplo_save = uplo;
112 int m_save = m;
113 double* a_save = a;
114 double* c_save = c;
115 int a_rs_save = a_rs;
116 int a_cs_save = a_cs;
117 int c_rs_save = c_rs;
118 int c_cs_save = c_cs;
119 int lda, inca;
120 int ldc, incc;
121
122 // Return early if possible.
123 if ( bl1_zero_dim2( m, k ) ) return;
124
125 // If necessary, allocate, initialize, and use a temporary contiguous
126 // copy of each matrix rather than the original matrices.
128 m,
129 k,
130 a_save, a_rs_save, a_cs_save,
131 &a, &a_rs, &a_cs );
132
134 m,
135 m,
136 c_save, c_rs_save, c_cs_save,
137 &c, &c_rs, &c_cs );
138
139 // Initialize with values assuming column-major storage.
140 lda = a_cs;
141 inca = a_rs;
142 ldc = c_cs;
143 incc = c_rs;
144
145 // Adjust the parameters based on the storage of each matrix.
146 if ( bl1_is_col_storage( c_rs, c_cs ) )
147 {
148 if ( bl1_is_col_storage( a_rs, a_cs ) )
149 {
150 // requested operation: uplo( C_c ) += A_c * A_c^T
151 // effective operation: uplo( C_c ) += A_c * A_c^T
152 }
153 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
154 {
155 // requested operation: uplo( C_c ) += A_r * A_r^T
156 // effective operation: uplo( C_c ) += A_c^T * A_c
157 bl1_swap_ints( lda, inca );
158
159 bl1_toggle_trans( trans );
160 }
161 }
162 else // if ( bl1_is_row_storage( c_rs, c_cs ) )
163 {
164 if ( bl1_is_col_storage( a_rs, a_cs ) )
165 {
166 // requested operation: uplo( C_r ) += A_c * A_c^T
167 // effective operation: ~uplo( C_c ) += A_c * A_c^T
168 bl1_swap_ints( ldc, incc );
169
170 bl1_toggle_uplo( uplo );
171 }
172 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
173 {
174 // requested operation: uplo( C_r ) += A_r * A_r^T
175 // effective operation: ~uplo( C_c ) += A_c^T * A_c
176 bl1_swap_ints( ldc, incc );
177 bl1_swap_ints( lda, inca );
178
179 bl1_toggle_uplo( uplo );
180 bl1_toggle_trans( trans );
181 }
182 }
183
184 bl1_dsyrk_blas( uplo,
185 trans,
186 m,
187 k,
188 alpha,
189 a, lda,
190 beta,
191 c, ldc );
192
193 // Free any temporary contiguous matrices, copying the result back to
194 // the original matrix.
195 bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
196 &a, &a_rs, &a_cs );
197
198 bl1_dfree_saved_contigmr( uplo_save,
199 m_save,
200 m_save,
201 c_save, c_rs_save, c_cs_save,
202 &c, &c_rs, &c_cs );
203}
void bl1_dsyrk_blas(uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int lda, double *beta, double *c, int ldc)
Definition bl1_syrk.c:436
void bl1_dfree_contigm(double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:29
void bl1_dcreate_contigmr(uplo1_t uplo, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:45
void bl1_dfree_saved_contigmr(uplo1_t uplo, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigmr.c:36
void bl1_dcreate_contigmt(trans1_t trans_dims, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmt.c:51

References bl1_dcreate_contigmr(), bl1_dcreate_contigmt(), bl1_dfree_contigm(), bl1_dfree_saved_contigmr(), bl1_dsyrk_blas(), bl1_is_col_storage(), and bl1_zero_dim2().

Referenced by bl1_dherk(), FLA_Herk_external(), FLA_Syrk_external(), and FLA_UDdate_UT_opd_var1().

◆ bl1_dsyrk_blas()

void bl1_dsyrk_blas ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
double * alpha,
double * a,
int lda,
double * beta,
double * c,
int ldc )
437{
438#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
439 enum CBLAS_ORDER cblas_order = CblasColMajor;
440 enum CBLAS_UPLO cblas_uplo;
441 enum CBLAS_TRANSPOSE cblas_trans;
442
443 bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
444 bl1_param_map_to_netlib_trans( trans, &cblas_trans );
445
446 cblas_dsyrk( cblas_order,
447 cblas_uplo,
448 cblas_trans,
449 m,
450 k,
451 *alpha,
452 a, lda,
453 *beta,
454 c, ldc );
455#else
456 char blas_uplo;
457 char blas_trans;
458
459 bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
460 bl1_param_map_to_netlib_trans( trans, &blas_trans );
461
462 F77_dsyrk( &blas_uplo,
463 &blas_trans,
464 &m,
465 &k,
466 alpha,
467 a, &lda,
468 beta,
469 c, &ldc );
470#endif
471}
void F77_dsyrk(char *uplo, char *transa, int *n, int *k, double *alpha, double *a, int *lda, double *beta, double *c, int *ldc)
void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_dsyrk(), CblasColMajor, and F77_dsyrk().

Referenced by bl1_dsyrk().

◆ bl1_ssyrk()

void bl1_ssyrk ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
float * alpha,
float * a,
int a_rs,
int a_cs,
float * beta,
float * c,
int c_rs,
int c_cs )
14{
15 uplo1_t uplo_save = uplo;
16 int m_save = m;
17 float* a_save = a;
18 float* c_save = c;
19 int a_rs_save = a_rs;
20 int a_cs_save = a_cs;
21 int c_rs_save = c_rs;
22 int c_cs_save = c_cs;
23 int lda, inca;
24 int ldc, incc;
25
26 // Return early if possible.
27 if ( bl1_zero_dim2( m, k ) ) return;
28
29 // If necessary, allocate, initialize, and use a temporary contiguous
30 // copy of each matrix rather than the original matrices.
32 m,
33 k,
34 a_save, a_rs_save, a_cs_save,
35 &a, &a_rs, &a_cs );
36
38 m,
39 m,
40 c_save, c_rs_save, c_cs_save,
41 &c, &c_rs, &c_cs );
42
43 // Initialize with values assuming column-major storage.
44 lda = a_cs;
45 inca = a_rs;
46 ldc = c_cs;
47 incc = c_rs;
48
49 // Adjust the parameters based on the storage of each matrix.
50 if ( bl1_is_col_storage( c_rs, c_cs ) )
51 {
52 if ( bl1_is_col_storage( a_rs, a_cs ) )
53 {
54 // requested operation: uplo( C_c ) += A_c * A_c^T
55 // effective operation: uplo( C_c ) += A_c * A_c^T
56 }
57 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
58 {
59 // requested operation: uplo( C_c ) += A_r * A_r^T
60 // effective operation: uplo( C_c ) += A_c^T * A_c
61 bl1_swap_ints( lda, inca );
62
63 bl1_toggle_trans( trans );
64 }
65 }
66 else // if ( bl1_is_row_storage( c_rs, c_cs ) )
67 {
68 if ( bl1_is_col_storage( a_rs, a_cs ) )
69 {
70 // requested operation: uplo( C_r ) += A_c * A_c^T
71 // effective operation: ~uplo( C_c ) += A_c * A_c^T
72 bl1_swap_ints( ldc, incc );
73
74 bl1_toggle_uplo( uplo );
75 }
76 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
77 {
78 // requested operation: uplo( C_r ) += A_r * A_r^T
79 // effective operation: ~uplo( C_c ) += A_c^T * A_c
80 bl1_swap_ints( ldc, incc );
81 bl1_swap_ints( lda, inca );
82
83 bl1_toggle_uplo( uplo );
84 bl1_toggle_trans( trans );
85 }
86 }
87
88 bl1_ssyrk_blas( uplo,
89 trans,
90 m,
91 k,
92 alpha,
93 a, lda,
94 beta,
95 c, ldc );
96
97 // Free any temporary contiguous matrices, copying the result back to
98 // the original matrix.
99 bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
100 &a, &a_rs, &a_cs );
101
102 bl1_sfree_saved_contigmr( uplo_save,
103 m_save,
104 m_save,
105 c_save, c_rs_save, c_cs_save,
106 &c, &c_rs, &c_cs );
107}
void bl1_ssyrk_blas(uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int lda, float *beta, float *c, int ldc)
Definition bl1_syrk.c:399
void bl1_sfree_saved_contigmr(uplo1_t uplo, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigmr.c:13
void bl1_sfree_contigm(float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:13
void bl1_screate_contigmr(uplo1_t uplo, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:13
void bl1_screate_contigmt(trans1_t trans_dims, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmt.c:13

References bl1_is_col_storage(), bl1_screate_contigmr(), bl1_screate_contigmt(), bl1_sfree_contigm(), bl1_sfree_saved_contigmr(), bl1_ssyrk_blas(), and bl1_zero_dim2().

Referenced by bl1_sherk(), FLA_Herk_external(), FLA_Syrk_external(), and FLA_UDdate_UT_ops_var1().

◆ bl1_ssyrk_blas()

void bl1_ssyrk_blas ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
float * alpha,
float * a,
int lda,
float * beta,
float * c,
int ldc )
400{
401#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
402 enum CBLAS_ORDER cblas_order = CblasColMajor;
403 enum CBLAS_UPLO cblas_uplo;
404 enum CBLAS_TRANSPOSE cblas_trans;
405
406 bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
407 bl1_param_map_to_netlib_trans( trans, &cblas_trans );
408
409 cblas_ssyrk( cblas_order,
410 cblas_uplo,
411 cblas_trans,
412 m,
413 k,
414 *alpha,
415 a, lda,
416 *beta,
417 c, ldc );
418#else
419 char blas_uplo;
420 char blas_trans;
421
422 bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
423 bl1_param_map_to_netlib_trans( trans, &blas_trans );
424
425 F77_ssyrk( &blas_uplo,
426 &blas_trans,
427 &m,
428 &k,
429 alpha,
430 a, &lda,
431 beta,
432 c, &ldc );
433#endif
434}
void F77_ssyrk(char *uplo, char *transa, int *n, int *k, float *alpha, float *a, int *lda, float *beta, float *c, int *ldc)
void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ssyrk(), CblasColMajor, and F77_ssyrk().

Referenced by bl1_ssyrk().

◆ bl1_zsyrk()

void bl1_zsyrk ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
dcomplex * alpha,
dcomplex * a,
int a_rs,
int a_cs,
dcomplex * beta,
dcomplex * c,
int c_rs,
int c_cs )
302{
303 uplo1_t uplo_save = uplo;
304 int m_save = m;
305 dcomplex* a_save = a;
306 dcomplex* c_save = c;
307 int a_rs_save = a_rs;
308 int a_cs_save = a_cs;
309 int c_rs_save = c_rs;
310 int c_cs_save = c_cs;
311 int lda, inca;
312 int ldc, incc;
313
314 // Return early if possible.
315 if ( bl1_zero_dim2( m, k ) ) return;
316
317 // If necessary, allocate, initialize, and use a temporary contiguous
318 // copy of each matrix rather than the original matrices.
320 m,
321 k,
322 a_save, a_rs_save, a_cs_save,
323 &a, &a_rs, &a_cs );
324
326 m,
327 m,
328 c_save, c_rs_save, c_cs_save,
329 &c, &c_rs, &c_cs );
330
331 // Initialize with values assuming column-major storage.
332 lda = a_cs;
333 inca = a_rs;
334 ldc = c_cs;
335 incc = c_rs;
336
337 // Adjust the parameters based on the storage of each matrix.
338 if ( bl1_is_col_storage( c_rs, c_cs ) )
339 {
340 if ( bl1_is_col_storage( a_rs, a_cs ) )
341 {
342 // requested operation: uplo( C_c ) += A_c * A_c^T
343 // effective operation: uplo( C_c ) += A_c * A_c^T
344 }
345 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
346 {
347 // requested operation: uplo( C_c ) += A_r * A_r^T
348 // effective operation: uplo( C_c ) += A_c^T * A_c
349 bl1_swap_ints( lda, inca );
350
351 bl1_toggle_trans( trans );
352 }
353 }
354 else // if ( bl1_is_row_storage( c_rs, c_cs ) )
355 {
356 if ( bl1_is_col_storage( a_rs, a_cs ) )
357 {
358 // requested operation: uplo( C_r ) += A_c * A_c^T
359 // effective operation: ~uplo( C_c ) += A_c * A_c^T
360 bl1_swap_ints( ldc, incc );
361
362 bl1_toggle_uplo( uplo );
363 }
364 else // if ( bl1_is_row_storage( a_rs, a_cs ) )
365 {
366 // requested operation: uplo( C_r ) += A_r * A_r^T
367 // effective operation: ~uplo( C_c ) += A_c^T * A_c
368 bl1_swap_ints( ldc, incc );
369 bl1_swap_ints( lda, inca );
370
371 bl1_toggle_uplo( uplo );
372 bl1_toggle_trans( trans );
373 }
374 }
375
376 bl1_zsyrk_blas( uplo,
377 trans,
378 m,
379 k,
380 alpha,
381 a, lda,
382 beta,
383 c, ldc );
384
385 // Free any temporary contiguous matrices, copying the result back to
386 // the original matrix.
387 bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
388 &a, &a_rs, &a_cs );
389
390 bl1_zfree_saved_contigmr( uplo_save,
391 m_save,
392 m_save,
393 c_save, c_rs_save, c_cs_save,
394 &c, &c_rs, &c_cs );
395}
void bl1_zsyrk_blas(uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int lda, dcomplex *beta, dcomplex *c, int ldc)
Definition bl1_syrk.c:510
void bl1_zfree_saved_contigmr(uplo1_t uplo, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigmr.c:82
void bl1_zcreate_contigmt(trans1_t trans_dims, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmt.c:127
void bl1_zcreate_contigmr(uplo1_t uplo, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:109
void bl1_zfree_contigm(dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:61
Definition blis_type_defs.h:138

References bl1_is_col_storage(), bl1_zcreate_contigmr(), bl1_zcreate_contigmt(), bl1_zero_dim2(), bl1_zfree_contigm(), bl1_zfree_saved_contigmr(), and bl1_zsyrk_blas().

Referenced by FLA_Syrk_external().

◆ bl1_zsyrk_blas()

void bl1_zsyrk_blas ( uplo1_t uplo,
trans1_t trans,
int m,
int k,
dcomplex * alpha,
dcomplex * a,
int lda,
dcomplex * beta,
dcomplex * c,
int ldc )
511{
512#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
513 enum CBLAS_ORDER cblas_order = CblasColMajor;
514 enum CBLAS_UPLO cblas_uplo;
515 enum CBLAS_TRANSPOSE cblas_trans;
516
517 bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
518 bl1_param_map_to_netlib_trans( trans, &cblas_trans );
519
520 cblas_zsyrk( cblas_order,
521 cblas_uplo,
522 cblas_trans,
523 m,
524 k,
525 alpha,
526 a, lda,
527 beta,
528 c, ldc );
529#else
530 char blas_uplo;
531 char blas_trans;
532
533 bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
534 bl1_param_map_to_netlib_trans( trans, &blas_trans );
535
536 F77_zsyrk( &blas_uplo,
537 &blas_trans,
538 &m,
539 &k,
540 alpha,
541 a, &lda,
542 beta,
543 c, &ldc );
544#endif
545}
void F77_zsyrk(char *uplo, char *transa, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *beta, dcomplex *c, int *ldc)
void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_zsyrk(), CblasColMajor, and F77_zsyrk().

Referenced by bl1_zsyrk().