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

◆ F77_ssyrk()

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

Definition at line 211 of file c_sblas3.c.

217 {
218
219 CBLAS_INT i,j,LDA,LDC;
220 float *A, *C;
221 CBLAS_UPLO uplo;
222 CBLAS_TRANSPOSE trans;
223
224 get_uplo_type(uplow,&uplo);
225 get_transpose_type(transp,&trans);
226
227 if (*layout == TEST_ROW_MJR) {
228 if (trans == CblasNoTrans) {
229 LDA = *k+1;
230 A = ( float* )malloc( (*n)*LDA*sizeof( float ) );
231 for( i=0; i<*n; i++ )
232 for( j=0; j<*k; j++ )
233 A[i*LDA+j]=a[j*(*lda)+i];
234 }
235 else{
236 LDA = *n+1;
237 A = ( float* )malloc( (*k)*LDA*sizeof( float ) );
238 for( i=0; i<*k; i++ )
239 for( j=0; j<*n; j++ )
240 A[i*LDA+j]=a[j*(*lda)+i];
241 }
242 LDC = *n+1;
243 C = ( float* )malloc( (*n)*LDC*sizeof( float ) );
244 for( i=0; i<*n; i++ )
245 for( j=0; j<*n; j++ )
246 C[i*LDC+j]=c[j*(*ldc)+i];
247 cblas_ssyrk(CblasRowMajor, uplo, trans, *n, *k, *alpha, A, LDA, *beta,
248 C, LDC );
249 for( j=0; j<*n; j++ )
250 for( i=0; i<*n; i++ )
251 c[j*(*ldc)+i]=C[i*LDC+j];
252 free(A);
253 free(C);
254 }
255 else if (*layout == TEST_COL_MJR)
256 cblas_ssyrk(CblasColMajor, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
257 c, *ldc );
258 else
259 cblas_ssyrk(UNDEFINED, uplo, trans, *n, *k, *alpha, a, *lda, *beta,
260 c, *ldc );
261}
void cblas_ssyrk(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE Trans, const CBLAS_INT N, const CBLAS_INT K, const float alpha, const float *A, const CBLAS_INT lda, const float beta, float *C, const CBLAS_INT ldc)
Definition cblas_ssyrk.c:12
CBLAS_UPLO
Definition cblas.h:41
CBLAS_TRANSPOSE
Definition cblas.h:40
@ CblasNoTrans
Definition cblas.h:40
@ CblasColMajor
Definition cblas.h:39
@ CblasRowMajor
Definition cblas.h:39
#define CBLAS_INT
Definition cblas.h:24
#define UNDEFINED
Definition cblas_test.h:28
#define TEST_ROW_MJR
Definition cblas_test.h:21
#define TEST_COL_MJR
Definition cblas_test.h:25
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: