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

Definition at line 265 of file c_zblas3.c.

267  {
268 
269  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 }
void cblas_zsyrk(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 *beta, void *C, const int ldc)
Definition: cblas_zsyrk.c:12
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
#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
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: