LAPACK  3.10.1
LAPACK: Linear Algebra PACKage

◆ F77_csyrk()

void F77_csyrk ( int *  layout,
char *  uplow,
char *  transp,
int *  n,
int *  k,
CBLAS_TEST_COMPLEX alpha,
CBLAS_TEST_COMPLEX a,
int *  lda,
CBLAS_TEST_COMPLEX beta,
CBLAS_TEST_COMPLEX c,
int *  ldc 
)

Definition at line 265 of file c_cblas3.c.

267  {
268 
269  int i,j,LDA,LDC;
270  CBLAS_TEST_COMPLEX *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_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
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_COMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
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_COMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) );
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_csyrk(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_csyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta,
315  c, *ldc );
316  else
317  cblas_csyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta,
318  c, *ldc );
319 }
#define UNDEFINED
Definition: c_cblas3.c:12
#define TEST_ROW_MJR
Definition: c_cblas3.c:11
#define TEST_COL_MJR
Definition: c_cblas3.c:10
CBLAS_UPLO
Definition: cblas.h:29
CBLAS_TRANSPOSE
Definition: cblas.h:28
@ CblasNoTrans
Definition: cblas.h:28
@ CblasColMajor
Definition: cblas.h:27
@ CblasRowMajor
Definition: cblas.h:27
void cblas_csyrk(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_csyrk.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
#define LDA
Definition: example_user.c:12
Here is the call graph for this function:
Here is the caller graph for this function: