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

◆ F77_dsyrk()

void F77_dsyrk ( CBLAS_INT * layout,
char * uplow,
char * transp,
CBLAS_INT * n,
CBLAS_INT * k,
double * alpha,
double * a,
CBLAS_INT * lda,
double * beta,
double * c,
CBLAS_INT * ldc )

Definition at line 217 of file c_dblas3.c.

223 {
224
225 CBLAS_INT i,j,LDA,LDC;
226 double *A, *C;
227 CBLAS_UPLO uplo;
228 CBLAS_TRANSPOSE trans;
229
230 get_uplo_type(uplow,&uplo);
231 get_transpose_type(transp,&trans);
232
233 if (*layout == TEST_ROW_MJR) {
234 if (trans == CblasNoTrans) {
235 LDA = *k+1;
236 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
237 for( i=0; i<*n; i++ )
238 for( j=0; j<*k; j++ )
239 A[i*LDA+j]=a[j*(*lda)+i];
240 }
241 else{
242 LDA = *n+1;
243 A = ( double* )malloc( (*k)*LDA*sizeof( double ) );
244 for( i=0; i<*k; i++ )
245 for( j=0; j<*n; j++ )
246 A[i*LDA+j]=a[j*(*lda)+i];
247 }
248 LDC = *n+1;
249 C = ( double* )malloc( (*n)*LDC*sizeof( double ) );
250 for( i=0; i<*n; i++ )
251 for( j=0; j<*n; j++ )
252 C[i*LDC+j]=c[j*(*ldc)+i];
253 cblas_dsyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
254 C, LDC );
255 for( j=0; j<*n; j++ )
256 for( i=0; i<*n; i++ )
257 c[j*(*ldc)+i]=C[i*LDC+j];
258 free(A);
259 free(C);
260 }
261 else if (*layout == TEST_COL_MJR)
262 cblas_dsyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
263 c, *ldc );
264 else
265 cblas_dsyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
266 c, *ldc );
267}
#define UNDEFINED
Definition c_dblas3.c:12
#define TEST_ROW_MJR
Definition c_dblas3.c:11
#define TEST_COL_MJR
Definition c_dblas3.c:10
CBLAS_UPLO
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
@ CblasNoTrans
Definition cblas.h:40
void cblas_dsyrk(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 beta, double *C, const CBLAS_INT ldc)
Definition cblas_dsyrk.c:12
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
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
Here is the call graph for this function: