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

◆ F77_zherk()

void F77_zherk ( CBLAS_INT * layout,
char * uplow,
char * transp,
CBLAS_INT * n,
CBLAS_INT * k,
double * alpha,
CBLAS_TEST_ZOMPLEX * a,
CBLAS_INT * lda,
double * beta,
CBLAS_TEST_ZOMPLEX * c,
CBLAS_INT * ldc )

Definition at line 304 of file c_zblas3.c.

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