26 A = (
float *)malloc( (*m)*LDA*
sizeof( float ) );
29 A[i*LDA+j]=a[j*(*lda)+i];
33 A = (
float* )malloc( LDA*(*k)*
sizeof( float ) );
36 A[i*LDA+j]=a[j*(*lda)+i];
40 B = (
float* )malloc( (*k)*LDB*
sizeof( float ) );
43 B[i*LDB+j]=b[j*(*ldb)+i];
47 B = (
float* )malloc( LDB*(*n)*
sizeof( float ) );
50 B[i*LDB+j]=b[j*(*ldb)+i];
53 C = (
float* )malloc( (*m)*LDC*
sizeof( float ) );
56 C[i*LDC+j]=c[j*(*ldc)+i];
58 B, LDB, *beta, C, LDC );
61 c[j*(*ldc)+i]=C[i*LDC+j];
68 b, *ldb, *beta, c, *ldc );
71 b, *ldb, *beta, c, *ldc );
88 A = (
float* )malloc( (*m)*LDA*
sizeof( float ) );
91 A[i*LDA+j]=a[j*(*lda)+i];
95 A = (
float* )malloc( (*n)*LDA*
sizeof( float ) );
98 A[i*LDA+j]=a[j*(*lda)+i];
101 B = (
float* )malloc( (*m)*LDB*
sizeof( float ) );
102 for( i=0; i<*m; i++ )
103 for( j=0; j<*n; j++ )
104 B[i*LDB+j]=b[j*(*ldb)+i];
106 C = (
float* )malloc( (*m)*LDC*
sizeof( float ) );
107 for( j=0; j<*n; j++ )
108 for( i=0; i<*m; i++ )
109 C[i*LDC+j]=c[j*(*ldc)+i];
110 cblas_ssymm(
CblasRowMajor, side, uplo, *m, *n, *alpha, A, LDA, B, LDB,
112 for( j=0; j<*n; j++ )
113 for( i=0; i<*m; i++ )
114 c[j*(*ldc)+i]=C[i*LDC+j];
120 cblas_ssymm(
CblasColMajor, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
123 cblas_ssymm(
UNDEFINED, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
129 float *beta,
float *c,
CBLAS_INT *ldc ) {
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];
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];
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];
161 for( j=0; j<*n; j++ )
162 for( i=0; i<*n; i++ )
163 c[j*(*ldc)+i]=C[i*LDC+j];
177 float *beta,
float *c,
CBLAS_INT *ldc ) {
190 A = (
float* )malloc( (*n)*LDA*
sizeof( float ) );
191 B = (
float* )malloc( (*n)*LDB*
sizeof( float ) );
192 for( i=0; i<*n; i++ )
193 for( j=0; j<*k; j++ ) {
194 A[i*LDA+j]=a[j*(*lda)+i];
195 B[i*LDB+j]=b[j*(*ldb)+i];
201 A = (
float* )malloc( LDA*(*k)*
sizeof( float ) );
202 B = (
float* )malloc( LDB*(*k)*
sizeof( float ) );
203 for( i=0; i<*k; i++ )
204 for( j=0; j<*n; j++ ){
205 A[i*LDA+j]=a[j*(*lda)+i];
206 B[i*LDB+j]=b[j*(*ldb)+i];
210 C = (
float* )malloc( (*n)*LDC*
sizeof( float ) );
211 for( i=0; i<*n; i++ )
212 for( j=0; j<*n; j++ )
213 C[i*LDC+j]=c[j*(*ldc)+i];
215 B, LDB, *beta, C, LDC );
216 for( j=0; j<*n; j++ )
217 for( i=0; i<*n; i++ )
218 c[j*(*ldc)+i]=C[i*LDC+j];
225 b, *ldb, *beta, c, *ldc );
228 b, *ldb, *beta, c, *ldc );
248 A = (
float* )malloc( (*m)*LDA*
sizeof( float ) );
249 for( i=0; i<*m; i++ )
250 for( j=0; j<*m; j++ )
251 A[i*LDA+j]=a[j*(*lda)+i];
255 A = (
float* )malloc( (*n)*LDA*
sizeof( float ) );
256 for( i=0; i<*n; i++ )
257 for( j=0; j<*n; j++ )
258 A[i*LDA+j]=a[j*(*lda)+i];
261 B = (
float* )malloc( (*m)*LDB*
sizeof( float ) );
262 for( i=0; i<*m; i++ )
263 for( j=0; j<*n; j++ )
264 B[i*LDB+j]=b[j*(*ldb)+i];
267 for( j=0; j<*n; j++ )
268 for( i=0; i<*m; i++ )
269 b[j*(*ldb)+i]=B[i*LDB+j];
299 A = (
float* )malloc( (*m)*LDA*
sizeof( float ) );
300 for( i=0; i<*m; i++ )
301 for( j=0; j<*m; j++ )
302 A[i*LDA+j]=a[j*(*lda)+i];
306 A = (
float* )malloc( (*n)*LDA*
sizeof( float ) );
307 for( i=0; i<*n; i++ )
308 for( j=0; j<*n; j++ )
309 A[i*LDA+j]=a[j*(*lda)+i];
312 B = (
float* )malloc( (*m)*LDB*
sizeof( float ) );
313 for( i=0; i<*m; i++ )
314 for( j=0; j<*n; j++ )
315 B[i*LDB+j]=b[j*(*ldb)+i];
318 for( j=0; j<*n; j++ )
319 for( i=0; i<*m; i++ )
320 b[j*(*ldb)+i]=B[i*LDB+j];
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)
void cblas_sgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, const CBLAS_INT M, const CBLAS_INT N, const CBLAS_INT K, const float alpha, const float *A, const CBLAS_INT lda, const float *B, const CBLAS_INT ldb, const float beta, float *C, const CBLAS_INT ldc)
void cblas_strsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *A, const CBLAS_INT lda, float *B, const CBLAS_INT ldb)
void cblas_ssymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *A, const CBLAS_INT lda, const float *B, const CBLAS_INT ldb, const float beta, float *C, const CBLAS_INT ldc)
void cblas_strmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const CBLAS_INT M, const CBLAS_INT N, const float alpha, const float *A, const CBLAS_INT lda, float *B, const CBLAS_INT ldb)
void cblas_ssyr2k(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 *B, const CBLAS_INT ldb, const float beta, float *C, const CBLAS_INT ldc)
void get_diag_type(char *type, CBLAS_DIAG *diag)
void get_side_type(char *type, CBLAS_SIDE *side)
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
void get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)