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

Definition at line 209 of file c_zblas3.c.

211  {
212 
213  int i,j,LDA,LDC;
214  CBLAS_TEST_ZOMPLEX *A, *C;
215  CBLAS_UPLO uplo;
216  CBLAS_TRANSPOSE trans;
217 
218  get_uplo_type(uplow,&uplo);
219  get_transpose_type(transp,&trans);
220 
221  if (*layout == TEST_ROW_MJR) {
222  if (trans == CblasNoTrans) {
223  LDA = *k+1;
224  A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
225  for( i=0; i<*n; i++ )
226  for( j=0; j<*k; j++ ) {
227  A[i*LDA+j].real=a[j*(*lda)+i].real;
228  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
229  }
230  }
231  else{
232  LDA = *n+1;
233  A=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
234  for( i=0; i<*k; i++ )
235  for( j=0; j<*n; j++ ) {
236  A[i*LDA+j].real=a[j*(*lda)+i].real;
237  A[i*LDA+j].imag=a[j*(*lda)+i].imag;
238  }
239  }
240  LDC = *n+1;
241  C=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
242  for( i=0; i<*n; i++ )
243  for( j=0; j<*n; j++ ) {
244  C[i*LDC+j].real=c[j*(*ldc)+i].real;
245  C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
246  }
247  cblas_zherk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
248  C, LDC );
249  for( j=0; j<*n; j++ )
250  for( i=0; i<*n; i++ ) {
251  c[j*(*ldc)+i].real=C[i*LDC+j].real;
252  c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
253  }
254  free(A);
255  free(C);
256  }
257  else if (*layout == TEST_COL_MJR)
258  cblas_zherk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
259  c, *ldc );
260  else
261  cblas_zherk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
262  c, *ldc );
263 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void cblas_zherk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const void *A, const int lda, const double beta, void *C, const int ldc)
Definition: cblas_zherk.c:12
#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: