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

◆ F77_cherk()

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

Definition at line 302 of file c_cblas3.c.

308 {
309
310 CBLAS_INT i,j,LDA,LDC;
311 CBLAS_TEST_COMPLEX *A, *C;
312 CBLAS_UPLO uplo;
313 CBLAS_TRANSPOSE trans;
314
315 get_uplo_type(uplow,&uplo);
316 get_transpose_type(transp,&trans);
317
318 if (*layout == TEST_ROW_MJR) {
319 if (trans == CblasNoTrans) {
320 LDA = *k+1;
321 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
322 for( i=0; i<*n; i++ )
323 for( j=0; j<*k; j++ ) {
324 A[i*LDA+j].real=a[j*(*lda)+i].real;
325 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
326 }
327 }
328 else{
329 LDA = *n+1;
330 A=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
331 for( i=0; i<*k; i++ )
332 for( j=0; j<*n; j++ ) {
333 A[i*LDA+j].real=a[j*(*lda)+i].real;
334 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
335 }
336 }
337 LDC = *n+1;
338 C=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDC*sizeof(CBLAS_TEST_COMPLEX ) );
339 for( i=0; i<*n; i++ )
340 for( j=0; j<*n; j++ ) {
341 C[i*LDC+j].real=c[j*(*ldc)+i].real;
342 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
343 }
344 cblas_cherk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
345 C, LDC );
346 for( j=0; j<*n; j++ )
347 for( i=0; i<*n; i++ ) {
348 c[j*(*ldc)+i].real=C[i*LDC+j].real;
349 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
350 }
351 free(A);
352 free(C);
353 }
354 else if (*layout == TEST_COL_MJR)
355 cblas_cherk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
356 c, *ldc );
357 else
358 cblas_cherk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
359 c, *ldc );
360}
#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
void cblas_cherk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K, const float alpha, const void *A, const CBLAS_INT lda, const float beta, void *C, const CBLAS_INT ldc)
Definition cblas_cherk.c:12
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
#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: