180 {
182 double *A, *B, *C;
185
188
191 LDA = *k+1;
192 LDB = *k+1;
193 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
194 B = ( double* )malloc( (*n)*LDB*sizeof( double ) );
195 for( i=0; i<*n; i++ )
196 for( j=0; j<*k; j++ ) {
197 A[i*LDA+j]=a[j*(*lda)+i];
198 B[i*LDB+j]=b[j*(*ldb)+i];
199 }
200 }
201 else {
202 LDA = *n+1;
203 LDB = *n+1;
204 A = ( double* )malloc( LDA*(*k)*sizeof( double ) );
205 B = ( double* )malloc( LDB*(*k)*sizeof( double ) );
206 for( i=0; i<*k; i++ )
207 for( j=0; j<*n; j++ ){
208 A[i*LDA+j]=a[j*(*lda)+i];
209 B[i*LDB+j]=b[j*(*ldb)+i];
210 }
211 }
212 LDC = *n+1;
213 C = ( double* )malloc( (*n)*LDC*sizeof( double ) );
214 for( i=0; i<*n; i++ )
215 for( j=0; j<*n; j++ )
216 C[i*LDC+j]=c[j*(*ldc)+i];
218 B, LDB, *beta, C, LDC );
219 for( j=0; j<*n; j++ )
220 for( i=0; i<*n; i++ )
221 c[j*(*ldc)+i]=C[i*LDC+j];
222 free(A);
223 free(B);
224 free(C);
225 }
228 b, *ldb, *beta, c, *ldc );
229 else
231 b, *ldb, *beta, c, *ldc );
232}
void cblas_dsyr2k(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K, const double alpha, const double *A, const CBLAS_INT lda, const double *B, const CBLAS_INT ldb, const double beta, double *C, const CBLAS_INT ldc)
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)