LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_chemm ( int *  layout,
char *  rtlf,
char *  uplow,
int *  m,
int *  n,
CBLAS_TEST_COMPLEX alpha,
CBLAS_TEST_COMPLEX a,
int *  lda,
CBLAS_TEST_COMPLEX b,
int *  ldb,
CBLAS_TEST_COMPLEX beta,
CBLAS_TEST_COMPLEX c,
int *  ldc 
)

Definition at line 90 of file c_cblas3.c.

93  {
94 
95  CBLAS_TEST_COMPLEX *A, *B, *C;
96  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_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX));
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_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) );
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_COMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_COMPLEX ) );
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_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX ) );
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_chemm( 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_chemm( CblasColMajor, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
149  beta, c, *ldc );
150  else
151  cblas_chemm( UNDEFINED, side, uplo, *m, *n, alpha, a, *lda, b, *ldb,
152  beta, c, *ldc );
153 }
void get_side_type(char *type, CBLAS_SIDE *side)
Definition: auxiliary.c:32
#define UNDEFINED
Definition: c_cblas3.c:12
#define TEST_COL_MJR
Definition: c_cblas3.c:10
#define LDB
Definition: example_user.c:13
CBLAS_SIDE
Definition: cblas.h:23
#define LDA
Definition: example_user.c:12
void cblas_chemm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
Definition: cblas_chemm.c:12
#define TEST_ROW_MJR
Definition: c_cblas3.c:11
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18

Here is the call graph for this function: