LAPACK 3.12.0
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 127 of file c_sblas3.c.

129 {
130
131 CBLAS_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 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:19
#define TEST_ROW_MJR
Definition cblas_test.h:12
#define TEST_COL_MJR
Definition cblas_test.h:16
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: