LAPACK 3.12.1
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 364 of file c_zblas3.c.

370 {
371
372 CBLAS_INT i,j,LDA,LDC;
373 CBLAS_TEST_ZOMPLEX *A, *C;
374 CBLAS_UPLO uplo;
375 CBLAS_TRANSPOSE trans;
376
377 get_uplo_type(uplow,&uplo);
378 get_transpose_type(transp,&trans);
379
380 if (*layout == TEST_ROW_MJR) {
381 if (trans == CblasNoTrans) {
382 LDA = *k+1;
383 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
384 for( i=0; i<*n; i++ )
385 for( j=0; j<*k; j++ ) {
386 A[i*LDA+j].real=a[j*(*lda)+i].real;
387 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
388 }
389 }
390 else{
391 LDA = *n+1;
392 A=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
393 for( i=0; i<*k; i++ )
394 for( j=0; j<*n; j++ ) {
395 A[i*LDA+j].real=a[j*(*lda)+i].real;
396 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
397 }
398 }
399 LDC = *n+1;
400 C=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
401 for( i=0; i<*n; i++ )
402 for( j=0; j<*n; j++ ) {
403 C[i*LDC+j].real=c[j*(*ldc)+i].real;
404 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
405 }
406 cblas_zsyrk(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, beta,
407 C, LDC );
408 for( j=0; j<*n; j++ )
409 for( i=0; i<*n; i++ ) {
410 c[j*(*ldc)+i].real=C[i*LDC+j].real;
411 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
412 }
413 free(A);
414 free(C);
415 }
416 else if (*layout == TEST_COL_MJR)
417 cblas_zsyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta,
418 c, *ldc );
419 else
420 cblas_zsyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta,
421 c, *ldc );
422}
#define UNDEFINED
Definition c_zblas3.c:13
#define TEST_ROW_MJR
Definition c_zblas3.c:12
#define TEST_COL_MJR
Definition c_zblas3.c:11
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: