78 {
79
80 double *A, *B, *C;
84
87
90 LDA = *m+1;
91 A = ( double* )malloc( (*m)*LDA*sizeof( double ) );
92 for( i=0; i<*m; i++ )
93 for( j=0; j<*m; j++ )
94 A[i*LDA+j]=a[j*(*lda)+i];
95 }
96 else{
97 LDA = *n+1;
98 A = ( double* )malloc( (*n)*LDA*sizeof( double ) );
99 for( i=0; i<*n; i++ )
100 for( j=0; j<*n; j++ )
101 A[i*LDA+j]=a[j*(*lda)+i];
102 }
103 LDB = *n+1;
104 B = ( double* )malloc( (*m)*LDB*sizeof( double ) );
105 for( i=0; i<*m; i++ )
106 for( j=0; j<*n; j++ )
107 B[i*LDB+j]=b[j*(*ldb)+i];
108 LDC = *n+1;
109 C = ( double* )malloc( (*m)*LDC*sizeof( double ) );
110 for( j=0; j<*n; j++ )
111 for( i=0; i<*m; i++ )
112 C[i*LDC+j]=c[j*(*ldc)+i];
113 cblas_dsymm(
CblasRowMajor, side, uplo, *m, *n, *alpha, A, LDA, B, LDB,
114 *beta, C, LDC );
115 for( j=0; j<*n; j++ )
116 for( i=0; i<*m; i++ )
117 c[j*(*ldc)+i]=C[i*LDC+j];
118 free(A);
119 free(B);
120 free(C);
121 }
123 cblas_dsymm(
CblasColMajor, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
124 *beta, c, *ldc );
125 else
126 cblas_dsymm(
UNDEFINED, side, uplo, *m, *n, *alpha, a, *lda, b, *ldb,
127 *beta, c, *ldc );
128}
void cblas_dsymm(CBLAS_LAYOUT layout, CBLAS_SIDE Side, CBLAS_UPLO Uplo, const CBLAS_INT M, const CBLAS_INT N, const double alpha, const double *A, const CBLAS_INT lda, const double *B, const CBLAS_INT ldb, const double beta, double *C, const CBLAS_INT ldc)
void get_side_type(char *type, CBLAS_SIDE *side)
void get_uplo_type(char *type, CBLAS_UPLO *uplo)