LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_zsyr2k ( int *  layout,
char *  uplow,
char *  transp,
int *  n,
int *  k,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX a,
int *  lda,
CBLAS_TEST_ZOMPLEX b,
int *  ldb,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX c,
int *  ldc 
)

Definition at line 384 of file c_zblas3.c.

387  {
388  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 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
#define LDB
Definition: example_user.c:13
#define UNDEFINED
Definition: c_zblas3.c:12
#define TEST_COL_MJR
Definition: c_zblas3.c:10
CBLAS_TRANSPOSE
Definition: cblas.h:20
#define LDA
Definition: example_user.c:12
void cblas_zsyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
Definition: cblas_zsyr2k.c:12
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
#define TEST_ROW_MJR
Definition: c_zblas3.c:11

Here is the call graph for this function: