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

◆ F77_zher2k()

void F77_zher2k ( int *  layout,
char *  uplow,
char *  transp,
int *  n,
int *  k,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX a,
int *  lda,
CBLAS_TEST_ZOMPLEX b,
int *  ldb,
double *  beta,
CBLAS_TEST_ZOMPLEX c,
int *  ldc 
)

Definition at line 320 of file c_zblas3.c.

323 {
324 int i,j,LDA,LDB,LDC;
325 CBLAS_TEST_ZOMPLEX *A, *B, *C;
326 CBLAS_UPLO uplo;
327 CBLAS_TRANSPOSE trans;
328
329 get_uplo_type(uplow,&uplo);
330 get_transpose_type(transp,&trans);
331
332 if (*layout == TEST_ROW_MJR) {
333 if (trans == CblasNoTrans) {
334 LDA = *k+1;
335 LDB = *k+1;
336 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ));
337 B=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDB*sizeof(CBLAS_TEST_ZOMPLEX ));
338 for( i=0; i<*n; i++ )
339 for( j=0; j<*k; j++ ) {
340 A[i*LDA+j].real=a[j*(*lda)+i].real;
341 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
342 B[i*LDB+j].real=b[j*(*ldb)+i].real;
343 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
344 }
345 }
346 else {
347 LDA = *n+1;
348 LDB = *n+1;
349 A=(CBLAS_TEST_ZOMPLEX* )malloc( LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX ) );
350 B=(CBLAS_TEST_ZOMPLEX* )malloc( LDB*(*k)*sizeof(CBLAS_TEST_ZOMPLEX ) );
351 for( i=0; i<*k; i++ )
352 for( j=0; j<*n; j++ ){
353 A[i*LDA+j].real=a[j*(*lda)+i].real;
354 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
355 B[i*LDB+j].real=b[j*(*ldb)+i].real;
356 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
357 }
358 }
359 LDC = *n+1;
360 C=(CBLAS_TEST_ZOMPLEX* )malloc( (*n)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
361 for( i=0; i<*n; i++ )
362 for( j=0; j<*n; j++ ) {
363 C[i*LDC+j].real=c[j*(*ldc)+i].real;
364 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
365 }
366 cblas_zher2k(CblasRowMajor, uplo, trans, *n, *k, alpha, A, LDA,
367 B, LDB, *beta, C, LDC );
368 for( j=0; j<*n; j++ )
369 for( i=0; i<*n; i++ ) {
370 c[j*(*ldc)+i].real=C[i*LDC+j].real;
371 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
372 }
373 free(A);
374 free(B);
375 free(C);
376 }
377 else if (*layout == TEST_COL_MJR)
378 cblas_zher2k(CblasColMajor, uplo, trans, *n, *k, alpha, a, *lda,
379 b, *ldb, *beta, c, *ldc );
380 else
381 cblas_zher2k(UNDEFINED, uplo, trans, *n, *k, alpha, a, *lda,
382 b, *ldb, *beta, c, *ldc );
383}
#define UNDEFINED
Definition: c_zblas3.c:12
#define TEST_ROW_MJR
Definition: c_zblas3.c:11
#define TEST_COL_MJR
Definition: c_zblas3.c:10
CBLAS_UPLO
Definition: cblas.h:41
CBLAS_TRANSPOSE
Definition: cblas.h:40
@ CblasNoTrans
Definition: cblas.h:40
void cblas_zher2k(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 *B, const CBLAS_INT ldb, const double beta, void *C, const CBLAS_INT ldc)
Definition: cblas_zher2k.c:12
@ CblasColMajor
Definition: cblas.h:39
@ CblasRowMajor
Definition: cblas.h:39
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 LDB
Definition: example_user.c:13
#define LDA
Definition: example_user.c:12
Here is the call graph for this function: