LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ F77_zsyrk()

void F77_zsyrk ( CBLAS_INT layout,
char *  uplow,
char *  transp,
CBLAS_INT n,
CBLAS_INT k,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX a,
CBLAS_INT lda,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX c,
CBLAS_INT ldc 
)

Definition at line 265 of file c_zblas3.c.

267 {
268
269 CBLAS_INT i,j,LDA,LDC;
270 CBLAS_TEST_ZOMPLEX *A, *C;
271 CBLAS_UPLO uplo;
272 CBLAS_TRANSPOSE trans;
273
274 get_uplo_type(uplow,&uplo);
275 get_transpose_type(transp,&trans);
276
277 if (*layout == TEST_ROW_MJR) {
278 if (trans == CblasNoTrans) {
279 LDA = *k+1;
280 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
281 for( i=0; i<*n; i++ )
282 for( j=0; j<*k; j++ ) {
283 A[i*LDA+j].real=a[j*(*lda)+i].real;
284 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
285 }
286 }
287 else{
288 LDA = *n+1;
289 A=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
290 for( i=0; i<*k; i++ )
291 for( j=0; j<*n; j++ ) {
292 A[i*LDA+j].real=a[j*(*lda)+i].real;
293 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
294 }
295 }
296 LDC = *n+1;
297 C=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
298 for( i=0; i<*n; i++ )
299 for( j=0; j<*n; j++ ) {
300 C[i*LDC+j].real=c[j*(*ldc)+i].real;
301 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
302 }
303 cblas_zsyrk(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, beta,
304 C, LDC );
305 for( j=0; j<*n; j++ )
306 for( i=0; i<*n; i++ ) {
307 c[j*(*ldc)+i].real=C[i*LDC+j].real;
308 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
309 }
310 free(A);
311 free(C);
312 }
313 else if (*layout == TEST_COL_MJR)
314 cblas_zsyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta,
315 c, *ldc );
316 else
317 cblas_zsyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta,
318 c, *ldc );
319}
#define UNDEFINED
Definition c_zblas3.c:12
#define TEST_ROW_MJR
Definition c_zblas3.c:11
#define TEST_COL_MJR
Definition c_zblas3.c:10
CBLAS_UPLO
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
@ CblasNoTrans
Definition cblas.h:40
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
void cblas_zsyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K, const void *alpha, const void *A, const CBLAS_INT lda, const void *beta, void *C, const CBLAS_INT ldc)
Definition cblas_zsyrk.c:12
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition auxiliary.c:8
Here is the call graph for this function: