181 if ((LDA < pastix_imax(1,Am)) && (Am > 0)) {
184 if ((LDB < pastix_imax(1,Bm)) && (Bm > 0)) {
187 if ((LDC < pastix_imax(1,M)) && (M > 0)) {
193 if ( ( ( transA ==
PastixNoTrans ) && ( LWORK < (M+1)*K) ) ||
195 pastix_print_error(
"CORE_gemdm: Illegal value of LWORK\n" );
197 pastix_print_error(
"LWORK %d < (M=%d+1)*K=%d ", LWORK, M, K );
200 pastix_print_error(
"LWORK %d < (N=%d+1)*K=%d ", LWORK, N, K );
206 if (M == 0 || N == 0 ||
207 ((alpha == 0.0 || K == 0) && beta == 1.0) ) {
215 cblas_ccopy(K, D, incD, wD2, 1);
226 for (j=0; j<K; j++, wD++) {
228 cblas_ccopy(M, &A[LDA*j], 1, &w[M*j], 1);
229 cblas_cscal(M, CBLAS_SADDR(delta), &w[M*j], 1);
233 cblas_cgemm(CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)transB,
235 CBLAS_SADDR(alpha), w, M,
237 CBLAS_SADDR(beta), C, LDC);
244 for (j=0; j<K; j++, wD++) {
246 cblas_ccopy(N, &B[j], LDB, &w[N*j], 1);
247 cblas_cscal(N, CBLAS_SADDR(delta), &w[N*j], 1);
251 cblas_cgemm(CblasColMajor, (CBLAS_TRANSPOSE)transA, CblasTrans,
253 CBLAS_SADDR(alpha), A, LDA,
255 CBLAS_SADDR(beta), C, LDC);
259 #if defined(PRECISION_z) || defined(PRECISION_c)
263 for (j=0; j<K; j++, wD++) {
265 cblas_ccopy(N, &B[LDB*j], 1, &w[N*j], 1);
266 ret = LAPACKE_clacgv_work(N, &w[N*j], 1);
268 cblas_cscal(N, CBLAS_SADDR(delta), &w[N*j], 1);
275 for (j=0; j<K; j++, wD++) {
277 cblas_ccopy(N, &B[LDB*j], 1, &w[N*j], 1);
278 cblas_cscal(N, CBLAS_SADDR(delta), &w[N*j], 1);
283 cblas_cgemm(CblasColMajor, (CBLAS_TRANSPOSE)transA, CblasNoTrans,
285 CBLAS_SADDR(alpha), A, LDA,
287 CBLAS_SADDR(beta), C, LDC);
float _Complex pastix_complex32_t
int core_cgemdm(pastix_trans_t transA, pastix_trans_t transB, int M, int N, int K, pastix_complex32_t alpha, const pastix_complex32_t *A, int LDA, const pastix_complex32_t *B, int LDB, pastix_complex32_t beta, pastix_complex32_t *C, int LDC, const pastix_complex32_t *D, int incD, pastix_complex32_t *WORK, int LWORK)
Perform one of the following matrix-matrix operations.
enum pastix_trans_e pastix_trans_t
Transpostion.