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

◆ F77_zhemm()

void F77_zhemm ( CBLAS_INT layout,
char *  rtlf,
char *  uplow,
CBLAS_INT m,
CBLAS_INT n,
CBLAS_TEST_ZOMPLEX alpha,
CBLAS_TEST_ZOMPLEX a,
CBLAS_INT lda,
CBLAS_TEST_ZOMPLEX b,
CBLAS_INT ldb,
CBLAS_TEST_ZOMPLEX beta,
CBLAS_TEST_ZOMPLEX c,
CBLAS_INT ldc 
)

Definition at line 90 of file c_zblas3.c.

93 {
94
95 CBLAS_TEST_ZOMPLEX *A, *B, *C;
96 CBLAS_INT i,j,LDA, LDB, LDC;
97 CBLAS_UPLO uplo;
98 CBLAS_SIDE side;
99
100 get_uplo_type(uplow,&uplo);
101 get_side_type(rtlf,&side);
102
103 if (*layout == TEST_ROW_MJR) {
104 if (side == CblasLeft) {
105 LDA = *m+1;
106 A= (CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
107 for( i=0; i<*m; i++ )
108 for( j=0; j<*m; j++ ) {
109 A[i*LDA+j].real=a[j*(*lda)+i].real;
110 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
111 }
112 }
113 else{
114 LDA = *n+1;
115 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
116 for( i=0; i<*n; i++ )
117 for( j=0; j<*n; j++ ) {
118 A[i*LDA+j].real=a[j*(*lda)+i].real;
119 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
120 }
121 }
122 LDB = *n+1;
123 B=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX ) );
124 for( i=0; i<*m; i++ )
125 for( j=0; j<*n; j++ ) {
126 B[i*LDB+j].real=b[j*(*ldb)+i].real;
127 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
128 }
129 LDC = *n+1;
130 C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
131 for( j=0; j<*n; j++ )
132 for( i=0; i<*m; i++ ) {
133 C[i*LDC+j].real=c[j*(*ldc)+i].real;
134 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
135 }
136 cblas_zhemm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB,
137 beta, C, LDC );
138 for( j=0; j<*n; j++ )
139 for( i=0; i<*m; i++ ) {
140 c[j*(*ldc)+i].real=C[i*LDC+j].real;
141 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
142 }
143 free(A);
144 free(B);
145 free(C);
146 }
147 else if (*layout == TEST_COL_MJR)
148 cblas_zhemm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
149 beta, c, *ldc );
150 else
151 cblas_zhemm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
152 beta, c, *ldc );
153}
#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
void cblas_zhemm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N, const void *alpha, const void *A, const CBLAS_INT lda, const void *B, const CBLAS_INT ldb, const void *beta, void *C, const CBLAS_INT ldc)
Definition cblas_zhemm.c:12
CBLAS_SIDE
Definition cblas.h:43
@ CblasLeft
Definition cblas.h:43
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
void get_side_type(char *type, CBLAS_SIDE *side)
Definition auxiliary.c:32
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition auxiliary.c:18
Here is the call graph for this function: