Use in-place transform shortcut only if matrix is square
This commit is contained in:
parent
d1c5b8f913
commit
376048156b
|
@ -126,8 +126,7 @@ void CNAME( enum CBLAS_ORDER CORDER, enum CBLAS_TRANSPOSE CTRANS, blasint crows,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#ifdef NEW_IMATCOPY
|
#ifdef NEW_IMATCOPY
|
||||||
if (*lda == *ldb) {
|
if (*lda == *ldb && *cols == *rows) {
|
||||||
fprintf(stderr," lda=ldb, new_imatcopy in place\n");
|
|
||||||
if ( order == BlasColMajor )
|
if ( order == BlasColMajor )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -141,7 +140,7 @@ fprintf(stderr," lda=ldb, new_imatcopy in place\n");
|
||||||
}
|
}
|
||||||
if ( trans == BlasTrans )
|
if ( trans == BlasTrans )
|
||||||
{
|
{
|
||||||
IMATCOPY_K_CT(*cols, *rows, alpha[0], alpha[1], a, *lda );
|
IMATCOPY_K_CT(*rows, *cols, alpha[0], alpha[1], a, *lda );
|
||||||
}
|
}
|
||||||
if ( trans == BlasTransConj )
|
if ( trans == BlasTransConj )
|
||||||
{
|
{
|
||||||
|
@ -161,7 +160,6 @@ fprintf(stderr," lda=ldb, new_imatcopy in place\n");
|
||||||
}
|
}
|
||||||
if ( trans == BlasTrans )
|
if ( trans == BlasTrans )
|
||||||
{
|
{
|
||||||
fprintf(stderr,"rows trans inplace\n");
|
|
||||||
IMATCOPY_K_RT(*rows, *cols, alpha[0], alpha[1], a, *lda );
|
IMATCOPY_K_RT(*rows, *cols, alpha[0], alpha[1], a, *lda );
|
||||||
}
|
}
|
||||||
if ( trans == BlasTransConj )
|
if ( trans == BlasTransConj )
|
||||||
|
@ -172,7 +170,7 @@ fprintf(stderr,"rows trans inplace\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
fprintf(stderr,"lda: %d ldb:%d\n",*lda,*ldb);
|
|
||||||
if ( *lda > *ldb )
|
if ( *lda > *ldb )
|
||||||
msize = (*lda) * (*ldb) * sizeof(FLOAT) * 2;
|
msize = (*lda) * (*ldb) * sizeof(FLOAT) * 2;
|
||||||
else
|
else
|
||||||
|
@ -181,7 +179,7 @@ fprintf(stderr,"lda: %d ldb:%d\n",*lda,*ldb);
|
||||||
b = malloc(msize);
|
b = malloc(msize);
|
||||||
if ( b == NULL )
|
if ( b == NULL )
|
||||||
{
|
{
|
||||||
printf("Memory alloc failed\n");
|
printf("Memory alloc failed in zimatcopy\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue