summaryrefslogtreecommitdiff
path: root/LAPACKE/src
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2016-02-23 06:12:17 +0000
committerjulie <julielangou@users.noreply.github.com>2016-02-23 06:12:17 +0000
commit2900a3d1c1b6d4c1e9ed33f3ce26a3ec705b61e5 (patch)
tree5dc6651503bba6920080769313741b21057b1bac /LAPACKE/src
parentd3daaf8ace52c6142af558e34a8406cb7eb4c08f (diff)
downloadlapack-2900a3d1c1b6d4c1e9ed33f3ce26a3ec705b61e5.tar.gz
lapack-2900a3d1c1b6d4c1e9ed33f3ce26a3ec705b61e5.tar.bz2
lapack-2900a3d1c1b6d4c1e9ed33f3ce26a3ec705b61e5.zip
APPLYING INTEL PATCHES sent to Julie on Feb 19th 2016 by Dima from INTEL (dmitry.g.baksheev@intel.com)
[PATCH 42/42] Fix lapacke_?tprfb - avoid nancheck of unset data ---> LAST ONE!!!
Diffstat (limited to 'LAPACKE/src')
-rw-r--r--LAPACKE/src/lapacke_ctprfb.c17
-rw-r--r--LAPACKE/src/lapacke_dtprfb.c17
-rw-r--r--LAPACKE/src/lapacke_stprfb.c17
-rw-r--r--LAPACKE/src/lapacke_ztprfb.c17
4 files changed, 60 insertions, 8 deletions
diff --git a/LAPACKE/src/lapacke_ctprfb.c b/LAPACKE/src/lapacke_ctprfb.c
index a007f924..45840e1a 100644
--- a/LAPACKE/src/lapacke_ctprfb.c
+++ b/LAPACKE/src/lapacke_ctprfb.c
@@ -41,6 +41,7 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb )
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
@@ -51,16 +52,28 @@ lapack_int LAPACKE_ctprfb( int matrix_layout, char side, char trans, char direct
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( storev, 'C' ) ) {
+ ncols_v = k;
+ nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ } else if( LAPACKE_lsame( storev, 'R' ) ) {
+ ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ nrows_v = k;
+ } else {
+ ncols_v = 0;
+ nrows_v = 0;
+ }
if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10;
}
#endif
diff --git a/LAPACKE/src/lapacke_dtprfb.c b/LAPACKE/src/lapacke_dtprfb.c
index f6746397..0aa5e917 100644
--- a/LAPACKE/src/lapacke_dtprfb.c
+++ b/LAPACKE/src/lapacke_dtprfb.c
@@ -39,6 +39,7 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
lapack_int ldv, const double* t, lapack_int ldt,
double* a, lapack_int lda, double* b, lapack_int ldb )
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
@@ -49,16 +50,28 @@ lapack_int LAPACKE_dtprfb( int matrix_layout, char side, char trans, char direct
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( storev, 'C' ) ) {
+ ncols_v = k;
+ nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ } else if( LAPACKE_lsame( storev, 'R' ) ) {
+ ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ nrows_v = k;
+ } else {
+ ncols_v = 0;
+ nrows_v = 0;
+ }
if( LAPACKE_dge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14;
}
if( LAPACKE_dge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_dge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12;
}
- if( LAPACKE_dge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_dge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10;
}
#endif
diff --git a/LAPACKE/src/lapacke_stprfb.c b/LAPACKE/src/lapacke_stprfb.c
index 217a91f4..cc83808a 100644
--- a/LAPACKE/src/lapacke_stprfb.c
+++ b/LAPACKE/src/lapacke_stprfb.c
@@ -39,6 +39,7 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
lapack_int ldv, const float* t, lapack_int ldt,
float* a, lapack_int lda, float* b, lapack_int ldb)
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
@@ -49,16 +50,28 @@ lapack_int LAPACKE_stprfb( int matrix_layout, char side, char trans, char direct
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( storev, 'C' ) ) {
+ ncols_v = k;
+ nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ } else if( LAPACKE_lsame( storev, 'R' ) ) {
+ ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ nrows_v = k;
+ } else {
+ ncols_v = 0;
+ nrows_v = 0;
+ }
if( LAPACKE_sge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14;
}
if( LAPACKE_sge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_sge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12;
}
- if( LAPACKE_sge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_sge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10;
}
#endif
diff --git a/LAPACKE/src/lapacke_ztprfb.c b/LAPACKE/src/lapacke_ztprfb.c
index 63a50bde..1698bd55 100644
--- a/LAPACKE/src/lapacke_ztprfb.c
+++ b/LAPACKE/src/lapacke_ztprfb.c
@@ -41,6 +41,7 @@ lapack_int LAPACKE_ztprfb( int matrix_layout, char side, char trans, char direct
lapack_complex_double* a, lapack_int lda,
lapack_complex_double* b, lapack_int ldb)
{
+ lapack_int ncols_v, nrows_v;
lapack_int info = 0;
lapack_int ldwork;
lapack_int work_size;
@@ -51,16 +52,28 @@ lapack_int LAPACKE_ztprfb( int matrix_layout, char side, char trans, char direct
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
+ if( LAPACKE_lsame( storev, 'C' ) ) {
+ ncols_v = k;
+ nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ } else if( LAPACKE_lsame( storev, 'R' ) ) {
+ ncols_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ nrows_v = k;
+ } else {
+ ncols_v = 0;
+ nrows_v = 0;
+ }
if( LAPACKE_zge_nancheck( matrix_layout, k, m, a, lda ) ) {
return -14;
}
if( LAPACKE_zge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -16;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldt, k, t, ldt ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, k, k, t, ldt ) ) {
return -12;
}
- if( LAPACKE_zge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_zge_nancheck( matrix_layout, nrows_v, ncols_v, v, ldv ) ) {
return -10;
}
#endif