diff --git a/LAPACKE/src/lapacke_cgesvd_work.c b/LAPACKE/src/lapacke_cgesvd_work.c index 5045150ff..280ae63cd 100644 --- a/LAPACKE/src/lapacke_cgesvd_work.c +++ b/LAPACKE/src/lapacke_cgesvd_work.c @@ -69,15 +69,19 @@ lapack_int API_SUFFIX(LAPACKE_cgesvd_work)( int matrix_layout, char jobu, char j API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgesvd_work", info ); return info; } - if( ldu < ncols_u ) { - info = -10; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ) { + if( ldu < ncols_u ) { + info = -10; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgesvd_work", info ); + return info; + } } - if( ldvt < ncols_vt ) { - info = -12; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobvt, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobvt, 's' ) ) { + if( ldvt < ncols_vt ) { + info = -12; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_cgesvd_work", info ); + return info; + } } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { diff --git a/LAPACKE/src/lapacke_dgesvd_work.c b/LAPACKE/src/lapacke_dgesvd_work.c index 99e27cfbd..f5a58b314 100644 --- a/LAPACKE/src/lapacke_dgesvd_work.c +++ b/LAPACKE/src/lapacke_dgesvd_work.c @@ -67,15 +67,19 @@ lapack_int API_SUFFIX(LAPACKE_dgesvd_work)( int matrix_layout, char jobu, char j API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dgesvd_work", info ); return info; } - if( ldu < ncols_u ) { - info = -10; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ) { + if( ldu < ncols_u ) { + info = -10; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dgesvd_work", info ); + return info; + } } - if( ldvt < ncols_vt ) { - info = -12; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobvt, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobvt, 's' ) ) { + if( ldvt < ncols_vt ) { + info = -12; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dgesvd_work", info ); + return info; + } } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { diff --git a/LAPACKE/src/lapacke_sgesvd_work.c b/LAPACKE/src/lapacke_sgesvd_work.c index f339db2f2..87cf9bb62 100644 --- a/LAPACKE/src/lapacke_sgesvd_work.c +++ b/LAPACKE/src/lapacke_sgesvd_work.c @@ -67,15 +67,19 @@ lapack_int API_SUFFIX(LAPACKE_sgesvd_work)( int matrix_layout, char jobu, char j API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sgesvd_work", info ); return info; } - if( ldu < ncols_u ) { - info = -10; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ) { + if( ldu < ncols_u ) { + info = -10; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sgesvd_work", info ); + return info; + } } - if( ldvt < ncols_vt ) { - info = -12; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobvt, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobvt, 's' ) ) { + if( ldvt < ncols_vt ) { + info = -12; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_sgesvd_work", info ); + return info; + } } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) { diff --git a/LAPACKE/src/lapacke_zgesvd_work.c b/LAPACKE/src/lapacke_zgesvd_work.c index 71af24e0a..0f036dd0e 100644 --- a/LAPACKE/src/lapacke_zgesvd_work.c +++ b/LAPACKE/src/lapacke_zgesvd_work.c @@ -69,15 +69,19 @@ lapack_int API_SUFFIX(LAPACKE_zgesvd_work)( int matrix_layout, char jobu, char j API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zgesvd_work", info ); return info; } - if( ldu < ncols_u ) { - info = -10; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobu, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobu, 's' ) ) { + if( ldu < ncols_u ) { + info = -10; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zgesvd_work", info ); + return info; + } } - if( ldvt < ncols_vt ) { - info = -12; - API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zgesvd_work", info ); - return info; + if( API_SUFFIX(LAPACKE_lsame)( jobvt, 'a' ) || API_SUFFIX(LAPACKE_lsame)( jobvt, 's' ) ) { + if( ldvt < ncols_vt ) { + info = -12; + API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zgesvd_work", info ); + return info; + } } /* Query optimal working array(s) size if requested */ if( lwork == -1 ) {