LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
void F77_ssyrk ( int *  layout,
char *  uplow,
char *  transp,
int *  n,
int *  k,
float *  alpha,
float *  a,
int *  lda,
float *  beta,
float *  c,
int *  ldc 
)

Definition at line 127 of file c_sblas3.c.

129  {
130 
131  int i,j,LDA,LDC;
132  float *A, *C;
133  CBLAS_UPLO uplo;
134  CBLAS_TRANSPOSE trans;
135 
136  get_uplo_type(uplow,&uplo);
137  get_transpose_type(transp,&trans);
138 
139  if (*layout == TEST_ROW_MJR) {
140  if (trans == CblasNoTrans) {
141  LDA = *k+1;
142  A = ( float* )malloc( (*n)*LDA*sizeof( float ) );
143  for( i=0; i<*n; i++ )
144  for( j=0; j<*k; j++ )
145  A[i*LDA+j]=a[j*(*lda)+i];
146  }
147  else{
148  LDA = *n+1;
149  A = ( float* )malloc( (*k)*LDA*sizeof( float ) );
150  for( i=0; i<*k; i++ )
151  for( j=0; j<*n; j++ )
152  A[i*LDA+j]=a[j*(*lda)+i];
153  }
154  LDC = *n+1;
155  C = ( float* )malloc( (*n)*LDC*sizeof( float ) );
156  for( i=0; i<*n; i++ )
157  for( j=0; j<*n; j++ )
158  C[i*LDC+j]=c[j*(*ldc)+i];
159  cblas_ssyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
160  C, LDC );
161  for( j=0; j<*n; j++ )
162  for( i=0; i<*n; i++ )
163  c[j*(*ldc)+i]=C[i*LDC+j];
164  free(A);
165  free(C);
166  }
167  else if (*layout == TEST_COL_MJR)
168  cblas_ssyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
169  c, *ldc );
170  else
171  cblas_ssyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
172  c, *ldc );
173 }
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
Definition: auxiliary.c:8
void cblas_ssyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc)
Definition: cblas_ssyrk.c:12
CBLAS_TRANSPOSE
Definition: cblas.h:20
#define LDA
Definition: example_user.c:12
#define UNDEFINED
Definition: cblas_test.h:19
#define TEST_COL_MJR
Definition: cblas_test.h:16
CBLAS_UPLO
Definition: cblas.h:21
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
Definition: auxiliary.c:18
#define TEST_ROW_MJR
Definition: cblas_test.h:12

Here is the call graph for this function: