LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ F77_dsyrk()

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

Definition at line 130 of file c_dblas3.c.

132  {
133 
134  int i,j,LDA,LDC;
135  double *A, *C;
136  CBLAS_UPLO uplo;
137  CBLAS_TRANSPOSE trans;
138 
139  get_uplo_type(uplow,&uplo);
140  get_transpose_type(transp,&trans);
141 
142  if (*layout == TEST_ROW_MJR) {
143  if (trans == CblasNoTrans) {
144  LDA = *k+1;
145  A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
146  for( i=0; i<*n; i++ )
147  for( j=0; j<*k; j++ )
148  A[i*LDA+j]=a[j*(*lda)+i];
149  }
150  else{
151  LDA = *n+1;
152  A = ( double* )malloc( (*k)*LDA*sizeof( double ) );
153  for( i=0; i<*k; i++ )
154  for( j=0; j<*n; j++ )
155  A[i*LDA+j]=a[j*(*lda)+i];
156  }
157  LDC = *n+1;
158  C = ( double* )malloc( (*n)*LDC*sizeof( double ) );
159  for( i=0; i<*n; i++ )
160  for( j=0; j<*n; j++ )
161  C[i*LDC+j]=c[j*(*ldc)+i];
162  cblas_dsyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
163  C, LDC );
164  for( j=0; j<*n; j++ )
165  for( i=0; i<*n; i++ )
166  c[j*(*ldc)+i]=C[i*LDC+j];
167  free(A);
168  free(C);
169  }
170  else if (*layout == TEST_COL_MJR)
171  cblas_dsyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
172  c, *ldc );
173  else
174  cblas_dsyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
175  c, *ldc );
176 }
#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:21
CBLAS_TRANSPOSE
Definition: cblas.h:20
@ CblasNoTrans
Definition: cblas.h:20
@ CblasColMajor
Definition: cblas.h:19
@ CblasRowMajor
Definition: cblas.h:19
void cblas_dsyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const CBLAS_INDEX N, const CBLAS_INDEX K, const double alpha, const double *A, const CBLAS_INDEX lda, const double beta, double *C, const CBLAS_INDEX ldc)
Definition: cblas_dsyrk.c:12
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
#define LDA
Definition: example_user.c:12
Here is the call graph for this function:
Here is the caller graph for this function: