LAPACK 3.12.1
LAPACK: Linear Algebra PACKage
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

◆ F77_dgemmtr()

void F77_dgemmtr ( CBLAS_INT * layout,
char * uplop,
char * transpa,
char * transpb,
CBLAS_INT * n,
CBLAS_INT * k,
double * alpha,
double * a,
CBLAS_INT * lda,
double * b,
CBLAS_INT * ldb,
double * beta,
double * c,
CBLAS_INT * ldc )

Definition at line 81 of file c_dblas3.c.

84 {
85
86 double *A, *B, *C;
87 CBLAS_INT i,j,LDA, LDB, LDC;
88 CBLAS_TRANSPOSE transa, transb;
89 CBLAS_UPLO uplo;
90
91 get_transpose_type(transpa, &transa);
92 get_transpose_type(transpb, &transb);
93 get_uplo_type(uplop, &uplo);
94
95 if (*layout == TEST_ROW_MJR) {
96 if (transa == CblasNoTrans) {
97 LDA = *k+1;
98 A=(double*)malloc((*n)*LDA*sizeof(double));
99 for( i=0; i<*n; i++ )
100 for( j=0; j<*k; j++ ) {
101 A[i*LDA+j]=a[j*(*lda)+i];
102 }
103 }
104 else {
105 LDA = *n+1;
106 A=(double* )malloc(LDA*(*k)*sizeof(double));
107 for( i=0; i<*k; i++ )
108 for( j=0; j<*n; j++ ) {
109 A[i*LDA+j]=a[j*(*lda)+i];
110 }
111 }
112
113 if (transb == CblasNoTrans) {
114 LDB = *n+1;
115 B=(double* )malloc((*k)*LDB*sizeof(double) );
116 for( i=0; i<*k; i++ )
117 for( j=0; j<*n; j++ ) {
118 B[i*LDB+j]=b[j*(*ldb)+i];
119 }
120 }
121 else {
122 LDB = *k+1;
123 B=(double* )malloc(LDB*(*n)*sizeof(double));
124 for( i=0; i<*n; i++ )
125 for( j=0; j<*k; j++ ) {
126 B[i*LDB+j]=b[j*(*ldb)+i];
127 }
128 }
129
130 LDC = *n+1;
131 C=(double* )malloc((*n)*LDC*sizeof(double));
132 for( j=0; j<*n; j++ )
133 for( i=0; i<*n; i++ ) {
134 C[i*LDC+j]=c[j*(*ldc)+i];
135 }
136 cblas_dgemmtr( CblasRowMajor, uplo, transa, transb, *n, *k, *alpha, A, LDA,
137 B, LDB, *beta, C, LDC );
138 for( j=0; j<*n; j++ )
139 for( i=0; i<*n; i++ ) {
140 c[j*(*ldc)+i]=C[i*LDC+j];
141 }
142 free(A);
143 free(B);
144 free(C);
145 }
146 else if (*layout == TEST_COL_MJR){
147 cblas_dgemmtr( CblasColMajor, uplo, transa, transb, *n, *k, *alpha, a, *lda,
148 b, *ldb, *beta, c, *ldc );
149 }
150 else
151 cblas_dgemmtr( UNDEFINED, uplo, transa, transb, *n, *k, *alpha, a, *lda,
152 b, *ldb, *beta, c, *ldc );
153}
#define UNDEFINED
Definition c_dblas3.c:12
#define TEST_ROW_MJR
Definition c_dblas3.c:11
#define TEST_COL_MJR
Definition c_dblas3.c:10
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
void cblas_dgemmtr(CBLAS_LAYOUT layout, CBLAS_UPLO Uplo, CBLAS_TRANSPOSE TransA, CBLAS_TRANSPOSE TransB, const CBLAS_INT N, const CBLAS_INT K, 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)
#define CBLAS_INT
Definition cblas.h:24
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: