75 {
76
77 float *A, *B, *C;
81
84
87 LDA = *m+1;
88 A = ( float* )malloc( (*m)*LDA*sizeof( float ) );
89 for( i=0; i<*m; i++ )
90 for( j=0; j<*m; j++ )
91 A[i*LDA+j]=a[j*(*lda)+i];
92 }
93 else{
94 LDA = *n+1;
95 A = ( float* )malloc( (*n)*LDA*sizeof( float ) );
96 for( i=0; i<*n; i++ )
97 for( j=0; j<*n; j++ )
98 A[i*LDA+j]=a[j*(*lda)+i];
99 }
100 LDB = *n+1;
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];
105 LDC = *n+1;
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,
111 *beta, C, LDC );
112 for( j=0; j<*n; j++ )
113 for( i=0; i<*m; i++ )
114 c[j*(*ldc)+i]=C[i*LDC+j];
115 free(A);
116 free(B);
117 free(C);
118 }
120 cblas_ssymm(
CblasColMajor, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
121 *beta, c, *ldc );
122 else
123 cblas_ssymm(
UNDEFINED, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
124 *beta, c, *ldc );
125}
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 get_side_type(char *type, CBLAS_SIDE *side)
void get_uplo_type(char *type, CBLAS_UPLO *uplo)