LAPACK 3.12.1
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 177 of file c_zblas3.c.

184 {
185
186 CBLAS_TEST_ZOMPLEX *A, *B, *C;
187 CBLAS_INT i,j,LDA, LDB, LDC;
188 CBLAS_UPLO uplo;
189 CBLAS_SIDE side;
190
191 get_uplo_type(uplow,&uplo);
192 get_side_type(rtlf,&side);
193
194 if (*layout == TEST_ROW_MJR) {
195 if (side == CblasLeft) {
196 LDA = *m+1;
197 A= (CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX));
198 for( i=0; i<*m; i++ )
199 for( j=0; j<*m; j++ ) {
200 A[i*LDA+j].real=a[j*(*lda)+i].real;
201 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
202 }
203 }
204 else{
205 LDA = *n+1;
206 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) );
207 for( i=0; i<*n; i++ )
208 for( j=0; j<*n; j++ ) {
209 A[i*LDA+j].real=a[j*(*lda)+i].real;
210 A[i*LDA+j].imag=a[j*(*lda)+i].imag;
211 }
212 }
213 LDB = *n+1;
214 B=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX ) );
215 for( i=0; i<*m; i++ )
216 for( j=0; j<*n; j++ ) {
217 B[i*LDB+j].real=b[j*(*ldb)+i].real;
218 B[i*LDB+j].imag=b[j*(*ldb)+i].imag;
219 }
220 LDC = *n+1;
221 C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) );
222 for( j=0; j<*n; j++ )
223 for( i=0; i<*m; i++ ) {
224 C[i*LDC+j].real=c[j*(*ldc)+i].real;
225 C[i*LDC+j].imag=c[j*(*ldc)+i].imag;
226 }
227 cblas_zhemm( CblasRowMajor, side, uplo, *m, *n, alpha, A, LDA, B, LDB,
228 beta, C, LDC );
229 for( j=0; j<*n; j++ )
230 for( i=0; i<*m; i++ ) {
231 c[j*(*ldc)+i].real=C[i*LDC+j].real;
232 c[j*(*ldc)+i].imag=C[i*LDC+j].imag;
233 }
234 free(A);
235 free(B);
236 free(C);
237 }
238 else if (*layout == TEST_COL_MJR)
239 cblas_zhemm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
240 beta, c, *ldc );
241 else
242 cblas_zhemm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
243 beta, c, *ldc );
244}
#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
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: