aboutsummaryrefslogtreecommitdiff
path: root/LAPACKE/src/lapacke_ctpmqrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'LAPACKE/src/lapacke_ctpmqrt.c')
-rw-r--r--LAPACKE/src/lapacke_ctpmqrt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/LAPACKE/src/lapacke_ctpmqrt.c b/LAPACKE/src/lapacke_ctpmqrt.c
index bcb92a81..c9ec1a86 100644
--- a/LAPACKE/src/lapacke_ctpmqrt.c
+++ b/LAPACKE/src/lapacke_ctpmqrt.c
@@ -41,6 +41,8 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
lapack_complex_float* a, lapack_int lda,
lapack_complex_float* b, lapack_int ldb )
{
+ lapack_int ncols_a, nrows_a;
+ lapack_int nrows_v;
lapack_int info = 0;
lapack_complex_float* work = NULL;
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
@@ -49,16 +51,22 @@ lapack_int LAPACKE_ctpmqrt( int matrix_layout, char side, char trans,
}
#ifndef LAPACK_DISABLE_NAN_CHECK
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, k, m, a, lda ) ) {
+ ncols_a = LAPACKE_lsame( side, 'L' ) ? n :
+ ( LAPACKE_lsame( side, 'R' ) ? k : 0 );
+ nrows_a = LAPACKE_lsame( side, 'L' ) ? k :
+ ( LAPACKE_lsame( side, 'R' ) ? m : 0 );
+ nrows_v = LAPACKE_lsame( side, 'L' ) ? m :
+ ( LAPACKE_lsame( side, 'R' ) ? n : 0 );
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_a, ncols_a, a, lda ) ) {
return -13;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, b, ldb ) ) {
return -15;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldt, nb, t, ldt ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nb, k, t, ldt ) ) {
return -11;
}
- if( LAPACKE_cge_nancheck( matrix_layout, ldv, k, v, ldv ) ) {
+ if( LAPACKE_cge_nancheck( matrix_layout, nrows_v, k, v, ldv ) ) {
return -9;
}
#endif