Skip to content

Commit 20d1118

Browse files
authored
Merge pull request #5143 from martin-frbg/issue5111
Fix GEMMT transforming the input array B in some complex cases
2 parents ceb8f1e + 75b958a commit 20d1118

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

interface/gemmt.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,5 +688,19 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo,
688688

689689
IDEBUG_END;
690690

691+
/* transform B back if necessary */
692+
#if defined(COMPLEX)
693+
if (transb > 1){
694+
#ifndef CBLAS
695+
IMATCOPY_K_CNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
696+
#else
697+
if (order == CblasColMajor)
698+
IMATCOPY_K_CNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
699+
if (order == CblasRowMajor)
700+
IMATCOPY_K_RNC(nrowb, ncolb, (FLOAT)(1.0), (FLOAT)(0.0), b, ldb);
701+
#endif
702+
}
703+
#endif
704+
691705
return;
692706
}

0 commit comments

Comments
 (0)