12 void F77_sgemm(
int *layout,
char *transpa,
char *transpb,
int *m,
int *n,
13 int *k,
float *alpha,
float *a,
int *lda,
float *b,
int *ldb,
14 float *beta,
float *c,
int *ldc ) {
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 );
73 void F77_ssymm(
int *layout,
char *rtlf,
char *uplow,
int *m,
int *n,
74 float *alpha,
float *a,
int *lda,
float *b,
int *ldb,
75 float *beta,
float *c,
int *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,
127 void F77_ssyrk(
int *layout,
char *uplow,
char *transp,
int *n,
int *k,
128 float *alpha,
float *a,
int *lda,
129 float *beta,
float *c,
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];
175 void F77_ssyr2k(
int *layout,
char *uplow,
char *transp,
int *n,
int *k,
176 float *alpha,
float *a,
int *lda,
float *b,
int *ldb,
177 float *beta,
float *c,
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 );
230 void F77_strmm(
int *layout,
char *rtlf,
char *uplow,
char *transp,
char *diagn,
231 int *m,
int *n,
float *alpha,
float *a,
int *lda,
float *b,
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];
281 void F77_strsm(
int *layout,
char *rtlf,
char *uplow,
char *transp,
char *diagn,
282 int *m,
int *n,
float *alpha,
float *a,
int *lda,
float *b,
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 get_transpose_type(char *type, CBLAS_TRANSPOSE *trans)
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)
void get_side_type(char *type, CBLAS_SIDE *side)
void F77_strsm(int *layout, char *rtlf, char *uplow, char *transp, char *diagn, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb)
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)
void cblas_ssymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, const int M, const int N, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc)
void cblas_strmm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda, float *B, const int ldb)
void F77_strmm(int *layout, char *rtlf, char *uplow, char *transp, char *diagn, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb)
void F77_ssyr2k(int *layout, char *uplow, char *transp, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc)
void cblas_sgemm(CBLAS_LAYOUT layout, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc)
void cblas_strsm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda, float *B, const int ldb)
void cblas_ssyr2k(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 *B, const int ldb, const float beta, float *C, const int ldc)
void F77_sgemm(int *layout, char *transpa, char *transpb, int *m, int *n, int *k, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc)
void get_diag_type(char *type, CBLAS_DIAG *diag)
void get_uplo_type(char *type, CBLAS_UPLO *uplo)
void F77_ssymm(int *layout, char *rtlf, char *uplow, int *m, int *n, float *alpha, float *a, int *lda, float *b, int *ldb, float *beta, float *c, int *ldc)