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

◆ F77_zsyr2k()

void F77_zsyr2k ( 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 b,
CBLAS_INT ldb,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX c,
CBLAS_INT ldc 
)

Definition at line 384 of file c_zblas3.c.

387 {
388 CBLAS_INT i,j,LDA,LDB,LDC;
389 CBLAS_TEST_ZOMPLEX *A, *B, *C;
390 CBLAS_UPLO uplo;
391 CBLAS_TRANSPOSE trans;
392
393 get_uplo_type(uplow,&uplo);
394 get_transpose_type(transp,&trans);
395
396 if (*layout == TEST_ROW_MJR) {
397 if (trans == CblasNoTrans) {
398 LDA = *k+1;
399 LDB = *k+1;
400 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
401 B=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_ZOMPLEX));
402 for( i=0; i<*n; i++ )
403 for( j=0; j<*k; j++ ) {
404 A[i*LDA+j].real=a[j*(*lda)+i].real;
405 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
406 B[i*LDB+j].real=b[j*(*ldb)+i].real;
407 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
408 }
409 }
410 else {
411 LDA = *n+1;
412 LDB = *n+1;
413 A=(CBLAS_TEST_ZOMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX));
414 B=(CBLAS_TEST_ZOMPLEX* )malloc(LDB*(*k)*sizeof(CBLAS_TEST_ZOMPLEX));
415 for( i=0; i<*k; i++ )
416 for( j=0; j<*n; j++ ){
417 A[i*LDA+j].real=a[j*(*lda)+i].real;
418 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
419 B[i*LDB+j].real=b[j*(*ldb)+i].real;
420 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
421 }
422 }
423 LDC = *n+1;
424 C=(CBLAS_TEST_ZOMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX));
425 for( i=0; i<*n; i++ )
426 for( j=0; j<*n; j++ ) {
427 C[i*LDC+j].real=c[j*(*ldc)+i].real;
428 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
429 }
430 cblas_zsyr2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA,
431 B, LDB, beta, C, LDC );
432 for( j=0; j<*n; j++ )
433 for( i=0; i<*n; i++ ) {
434 c[j*(*ldc)+i].real=C[i*LDC+j].real;
435 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
436 }
437 free(A);
438 free(B);
439 free(C);
440 }
441 else if (*layout == TEST_COL_MJR)
442 cblas_zsyr2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda,
443 b, *ldb, beta, c, *ldc );
444 else
445 cblas_zsyr2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda,
446 b, *ldb, beta, c, *ldc );
447}
#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
void cblas_zsyr2k(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 *B, const CBLAS_INT ldb, const void *beta, void *C, const CBLAS_INT ldc)
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
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: