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

◆ F77_csyrk()

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

Definition at line 362 of file c_cblas3.c.

368 {
369
370 CBLAS_INT i,j,LDA,LDC;
371 CBLAS_TEST_COMPLEX *A, *C;
372 CBLAS_UPLO uplo;
373 CBLAS_TRANSPOSE trans;
374
375 get_uplo_type(uplow,&uplo);
376 get_transpose_type(transp,&trans);
377
378 if (*layout == TEST_ROW_MJR) {
379 if (trans == CblasNoTrans) {
380 LDA = *k+1;
381 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX));
382 for( i=0; i<*n; i++ )
383 for( j=0; j<*k; j++ ) {
384 A[i*LDA+j].real=a[j*(*lda)+i].real;
385 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
386 }
387 }
388 else{
389 LDA = *n+1;
390 A=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
391 for( i=0; i<*k; i++ )
392 for( j=0; j<*n; j++ ) {
393 A[i*LDA+j].real=a[j*(*lda)+i].real;
394 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
395 }
396 }
397 LDC = *n+1;
398 C=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) );
399 for( i=0; i<*n; i++ )
400 for( j=0; j<*n; j++ ) {
401 C[i*LDC+j].real=c[j*(*ldc)+i].real;
402 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
403 }
404 cblas_csyrk(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA, beta,
405 C, LDC );
406 for( j=0; j<*n; j++ )
407 for( i=0; i<*n; i++ ) {
408 c[j*(*ldc)+i].real=C[i*LDC+j].real;
409 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
410 }
411 free(A);
412 free(C);
413 }
414 else if (*layout == TEST_COL_MJR)
415 cblas_csyrk(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda, beta,
416 c, *ldc );
417 else
418 cblas_csyrk(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda, beta,
419 c, *ldc );
420}
#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:41
CBLAS_TRANSPOSE
Definition cblas.h:40
@ CblasNoTrans
Definition cblas.h:40
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
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
#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: