Removed spurious checks for INFO in xLACPY,xLASET after routines not returning any,and redundant requirements for ldvt in xGESVD_WORK
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) ||
+ LAPACKE_lsame( jobvt, 's' ) ) ? n : 1;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_cgesvd_work", info );
return info;
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_cge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_che_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
lapack_int LAPACKE_chegst( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
- lapack_int lda, lapack_complex_float* b,
+ lapack_int lda, const lapack_complex_float* b,
lapack_int ldb )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
lapack_int LAPACKE_chegst_work( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_float* a,
- lapack_int lda, lapack_complex_float* b,
+ lapack_int lda, const lapack_complex_float* b,
lapack_int ldb )
{
lapack_int info = 0;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
}
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_clacpy( &uplo, &m, &n, a, &lda, b, &ldb );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_int ldb_t = MAX(1,m);
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_claset( &uplo, &m, &n, &alpha, &beta, a, &lda );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_complex_float* a_t = NULL;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_csy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
}
#include "lapacke_utils.h"
lapack_int LAPACKE_csytrs2( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, lapack_complex_float* a,
+ lapack_int nrhs, const lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* b, lapack_int ldb )
{
#include "lapacke_utils.h"
lapack_int LAPACKE_csytrs2_work( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, lapack_complex_float* a,
+ lapack_int nrhs, const lapack_complex_float* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_float* b, lapack_int ldb,
lapack_complex_float* work )
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -5;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ctr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -4;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_cge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
if( LAPACKE_c_nancheck( n-1, tau, 1 ) ) {
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
r = LAPACKE_lsame( side, 'l' ) ? m : n;
- if( LAPACKE_cge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ if( LAPACKE_che_nancheck( matrix_layout, uplo, r, a, lda ) ) {
return -7;
}
if( LAPACKE_cge_nancheck( matrix_layout, m, n, c, ldc ) ) {
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) ||
+ LAPACKE_lsame( jobvt, 's' ) ) ? n : 1;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_dgesvd_work", info );
return info;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_dlacpy( &uplo, &m, &n, a, &lda, b, &ldb );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_int ldb_t = MAX(1,m);
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_dlaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
double* a_t = NULL;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
if( LAPACKE_d_nancheck( n-1, tau, 1 ) ) {
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
r = LAPACKE_lsame( side, 'l' ) ? m : n;
- if( LAPACKE_dge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, r, a, lda ) ) {
return -7;
}
if( LAPACKE_dge_nancheck( matrix_layout, m, n, c, ldc ) ) {
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
}
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_dge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_dsy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -7;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_dsy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
#include "lapacke_utils.h"
lapack_int LAPACKE_dsytrs2( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, double* a, lapack_int lda,
+ lapack_int nrhs, const double* a, lapack_int lda,
const lapack_int* ipiv, double* b, lapack_int ldb )
{
lapack_int info = 0;
#include "lapacke_utils.h"
lapack_int LAPACKE_dsytrs2_work( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, double* a,
+ lapack_int nrhs, const double* a,
lapack_int lda, const lapack_int* ipiv,
double* b, lapack_int ldb, double* work )
{
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -5;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_dge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_dtr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -4;
}
}
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) ||
+ LAPACKE_lsame( jobvt, 's' ) ) ? n : 1;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_sgesvd_work", info );
return info;
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_slacpy( &uplo, &m, &n, a, &lda, b, &ldb );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_int ldb_t = MAX(1,m);
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_slaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
float* a_t = NULL;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
if( LAPACKE_s_nancheck( n-1, tau, 1 ) ) {
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
r = LAPACKE_lsame( side, 'l' ) ? m : n;
- if( LAPACKE_sge_nancheck( matrix_layout, r, r, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, r, a, lda ) ) {
return -7;
}
if( LAPACKE_sge_nancheck( matrix_layout, m, n, c, ldc ) ) {
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
}
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_sge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_ssy_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -7;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
if( LAPACKE_s_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_ssy_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
#include "lapacke_utils.h"
lapack_int LAPACKE_ssytrs2( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, float* a, lapack_int lda,
+ lapack_int nrhs, const float* a, lapack_int lda,
const lapack_int* ipiv, float* b, lapack_int ldb )
{
lapack_int info = 0;
#include "lapacke_utils.h"
lapack_int LAPACKE_ssytrs2_work( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, float* a,
+ lapack_int nrhs, const float* a,
lapack_int lda, const lapack_int* ipiv,
float* b, lapack_int ldb, float* work )
{
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -5;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_sge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_str_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -4;
}
}
( LAPACKE_lsame( jobu, 's' ) ? MIN(m,n) : 1);
lapack_int nrows_vt = LAPACKE_lsame( jobvt, 'a' ) ? n :
( LAPACKE_lsame( jobvt, 's' ) ? MIN(m,n) : 1);
+ lapack_int ncols_vt = ( LAPACKE_lsame( jobvt, 'a' ) ||
+ LAPACKE_lsame( jobvt, 's' ) ) ? n : 1;
lapack_int lda_t = MAX(1,m);
lapack_int ldu_t = MAX(1,nrows_u);
lapack_int ldvt_t = MAX(1,nrows_vt);
LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
return info;
}
- if( ldvt < n ) {
+ if( ldvt < ncols_vt ) {
info = -12;
LAPACKE_xerbla( "LAPACKE_zgesvd_work", info );
return info;
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
info = info - 1;
}
/* Transpose output matrices */
- if ( jobz == 'V') {
+ if ( jobz == 'V' || jobz == 'v' ) {
LAPACKE_zge_trans( LAPACK_COL_MAJOR, n, n, a_t, lda_t, a, lda );
} else {
LAPACKE_zhe_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
lapack_int LAPACKE_zhegst( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_double* a,
- lapack_int lda, lapack_complex_double* b,
+ lapack_int lda, const lapack_complex_double* b,
lapack_int ldb )
{
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
lapack_int LAPACKE_zhegst_work( int matrix_layout, lapack_int itype, char uplo,
lapack_int n, lapack_complex_double* a,
- lapack_int lda, lapack_complex_double* b,
+ lapack_int lda, const lapack_complex_double* b,
lapack_int ldb )
{
lapack_int info = 0;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -6;
}
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -8;
}
}
if( LAPACKE_d_nancheck( 1, &abstol, 1 ) ) {
return -15;
}
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, b, ldb ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, b, ldb ) ) {
return -9;
}
if( LAPACKE_lsame( range, 'v' ) ) {
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
}
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_zlacpy( &uplo, &m, &n, a, &lda, b, &ldb );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_int ldb_t = MAX(1,m);
if( matrix_layout == LAPACK_COL_MAJOR ) {
/* Call LAPACK function and adjust info */
LAPACK_zlaset( &uplo, &m, &n, &alpha, &beta, a, &lda );
- if( info < 0 ) {
- info = info - 1;
- }
} else if( matrix_layout == LAPACK_ROW_MAJOR ) {
lapack_int lda_t = MAX(1,m);
lapack_complex_double* a_t = NULL;
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zsy_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -5;
}
}
#include "lapacke_utils.h"
lapack_int LAPACKE_zsytrs2( int matrix_layout, char uplo, lapack_int n,
- lapack_int nrhs, lapack_complex_double* a,
+ lapack_int nrhs, const lapack_complex_double* a,
lapack_int lda, const lapack_int* ipiv,
lapack_complex_double* b, lapack_int ldb )
{
lapack_int LAPACKE_zsytrs2_work( int matrix_layout, char uplo, lapack_int n,
lapack_int nrhs,
- lapack_complex_double* a, lapack_int lda,
+ const lapack_complex_double* a, lapack_int lda,
const lapack_int* ipiv,
lapack_complex_double* b, lapack_int ldb,
lapack_complex_double* work )
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -5;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_ztr_nancheck( matrix_layout, uplo, 'n', n, a, lda ) ) {
return -4;
}
}
#ifndef LAPACK_DISABLE_NAN_CHECK
if( LAPACKE_get_nancheck() ) {
/* Optionally check input matrices for NaNs */
- if( LAPACKE_zge_nancheck( matrix_layout, n, n, a, lda ) ) {
+ if( LAPACKE_zhe_nancheck( matrix_layout, uplo, n, a, lda ) ) {
return -4;
}
if( LAPACKE_z_nancheck( n-1, tau, 1 ) ) {