diff --git a/src/bdsvdx.cc b/src/bdsvdx.cc index c9eb6f30..855f7428 100644 --- a/src/bdsvdx.cc +++ b/src/bdsvdx.cc @@ -8,7 +8,7 @@ #include "lapack/fortran.h" #include "NoConstructAllocator.hh" -#if LAPACK_VERSION >= 30600 // >= v3.6 +#if LAPACK_VERSION >= 30600 // >= 3.6.0 #include @@ -34,7 +34,7 @@ int64_t bdsvdx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int info_ = 0; @@ -202,7 +202,7 @@ int64_t bdsvdx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int info_ = 0; @@ -228,4 +228,4 @@ int64_t bdsvdx( } // namespace lapack -#endif // LAPACK >= v3.6 +#endif // LAPACK >= 3.6.0 diff --git a/src/gebal.cc b/src/gebal.cc index 8669f708..676238bc 100644 --- a/src/gebal.cc +++ b/src/gebal.cc @@ -27,8 +27,8 @@ int64_t gebal( char balance_ = to_char( balance ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; LAPACK_sgebal( @@ -56,8 +56,8 @@ int64_t gebal( char balance_ = to_char( balance ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; LAPACK_dgebal( @@ -85,8 +85,8 @@ int64_t gebal( char balance_ = to_char( balance ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; LAPACK_cgebal( @@ -203,8 +203,8 @@ int64_t gebal( char balance_ = to_char( balance ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; LAPACK_zgebal( diff --git a/src/gees.cc b/src/gees.cc index ad83634b..8f9e68bb 100644 --- a/src/gees.cc +++ b/src/gees.cc @@ -28,7 +28,7 @@ int64_t gees( char sort_ = to_char( sort ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; @@ -214,7 +214,7 @@ int64_t gees( char sort_ = to_char( sort ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; diff --git a/src/geesx.cc b/src/geesx.cc index a9a2bd6c..02b6b31a 100644 --- a/src/geesx.cc +++ b/src/geesx.cc @@ -31,7 +31,7 @@ int64_t geesx( char sense_ = to_char( sense ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; @@ -103,7 +103,7 @@ int64_t geesx( char sense_ = to_char( sense ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; @@ -175,7 +175,7 @@ int64_t geesx( char sense_ = to_char( sense ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; @@ -236,7 +236,7 @@ int64_t geesx( char sense_ = to_char( sense ); lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvs_ = to_lapack_int( ldvs ); lapack_int info_ = 0; diff --git a/src/gelsd.cc b/src/gelsd.cc index ff4d3c9f..c5f5cb59 100644 --- a/src/gelsd.cc +++ b/src/gelsd.cc @@ -30,7 +30,7 @@ int64_t gelsd( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -82,7 +82,7 @@ int64_t gelsd( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -134,7 +134,7 @@ int64_t gelsd( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -272,7 +272,7 @@ int64_t gelsd( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size diff --git a/src/gelss.cc b/src/gelss.cc index ecb5d17b..29775300 100644 --- a/src/gelss.cc +++ b/src/gelss.cc @@ -30,7 +30,7 @@ int64_t gelss( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -77,7 +77,7 @@ int64_t gelss( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -124,7 +124,7 @@ int64_t gelss( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -242,7 +242,7 @@ int64_t gelss( lapack_int nrhs_ = to_lapack_int( nrhs ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size diff --git a/src/gelsy.cc b/src/gelsy.cc index 396afb4b..3e6e95f9 100644 --- a/src/gelsy.cc +++ b/src/gelsy.cc @@ -37,7 +37,7 @@ int64_t gelsy( #else lapack_int* jpvt_ptr = jpvt; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -94,7 +94,7 @@ int64_t gelsy( #else lapack_int* jpvt_ptr = jpvt; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -151,7 +151,7 @@ int64_t gelsy( #else lapack_int* jpvt_ptr = jpvt; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size @@ -311,7 +311,7 @@ int64_t gelsy( #else lapack_int* jpvt_ptr = jpvt; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // query for workspace size diff --git a/src/gesv.cc b/src/gesv.cc index 8ce3edfb..a50e8f6c 100644 --- a/src/gesv.cc +++ b/src/gesv.cc @@ -226,7 +226,7 @@ int64_t gesv( #endif lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldx_ = to_lapack_int( ldx ); - lapack_int iter_ = to_lapack_int( *iter ); + lapack_int iter_ = 0; lapack_int info_ = 0; // allocate workspace @@ -272,7 +272,7 @@ int64_t gesv( #endif lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldx_ = to_lapack_int( ldx ); - lapack_int iter_ = to_lapack_int( *iter ); + lapack_int iter_ = 0; lapack_int info_ = 0; // allocate workspace diff --git a/src/gesvdx.cc b/src/gesvdx.cc index 745a6da1..d28e495e 100644 --- a/src/gesvdx.cc +++ b/src/gesvdx.cc @@ -8,7 +8,7 @@ #include "lapack/fortran.h" #include "NoConstructAllocator.hh" -#if LAPACK_VERSION >= 30600 // >= v3.6 +#if LAPACK_VERSION >= 30600 // >= 3.6.0 #include @@ -36,7 +36,7 @@ int64_t gesvdx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldvt_ = to_lapack_int( ldvt ); lapack_int info_ = 0; @@ -97,7 +97,7 @@ int64_t gesvdx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldvt_ = to_lapack_int( ldvt ); lapack_int info_ = 0; @@ -158,7 +158,7 @@ int64_t gesvdx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldvt_ = to_lapack_int( ldvt ); lapack_int info_ = 0; @@ -353,7 +353,7 @@ int64_t gesvdx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldvt_ = to_lapack_int( ldvt ); lapack_int info_ = 0; @@ -405,4 +405,4 @@ int64_t gesvdx( } // namespace lapack -#endif // LAPACK >= v3.6 +#endif // LAPACK >= 3.6.0 diff --git a/src/ggbal.cc b/src/ggbal.cc index 4c376dbc..467d55a5 100644 --- a/src/ggbal.cc +++ b/src/ggbal.cc @@ -30,8 +30,8 @@ int64_t ggbal( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; // from docs @@ -70,8 +70,8 @@ int64_t ggbal( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; // from docs @@ -110,8 +110,8 @@ int64_t ggbal( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; // from docs @@ -150,8 +150,8 @@ int64_t ggbal( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int ilo_ = to_lapack_int( *ilo ); - lapack_int ihi_ = to_lapack_int( *ihi ); + lapack_int ilo_ = 0; + lapack_int ihi_ = 0; lapack_int info_ = 0; // from docs diff --git a/src/gges.cc b/src/gges.cc index 0957f732..7fbac456 100644 --- a/src/gges.cc +++ b/src/gges.cc @@ -34,7 +34,7 @@ int64_t gges( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -111,7 +111,7 @@ int64_t gges( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -188,7 +188,7 @@ int64_t gges( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -259,7 +259,7 @@ int64_t gges( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; diff --git a/src/gges3.cc b/src/gges3.cc index 801c9cc6..e6f87642 100644 --- a/src/gges3.cc +++ b/src/gges3.cc @@ -36,7 +36,7 @@ int64_t gges3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -113,7 +113,7 @@ int64_t gges3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -190,7 +190,7 @@ int64_t gges3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -261,7 +261,7 @@ int64_t gges3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; diff --git a/src/ggesx.cc b/src/ggesx.cc index 451c2ba7..0c398d6e 100644 --- a/src/ggesx.cc +++ b/src/ggesx.cc @@ -37,7 +37,7 @@ int64_t ggesx( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -126,7 +126,7 @@ int64_t ggesx( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -215,7 +215,7 @@ int64_t ggesx( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; @@ -298,7 +298,7 @@ int64_t ggesx( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int ldvsl_ = to_lapack_int( ldvsl ); lapack_int ldvsr_ = to_lapack_int( ldvsr ); lapack_int info_ = 0; diff --git a/src/ggsvd3.cc b/src/ggsvd3.cc index 0923c726..415a99d5 100644 --- a/src/ggsvd3.cc +++ b/src/ggsvd3.cc @@ -37,8 +37,8 @@ int64_t ggsvd3( lapack_int m_ = to_lapack_int( m ); lapack_int n_ = to_lapack_int( n ); lapack_int p_ = to_lapack_int( p ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldu_ = to_lapack_int( ldu ); @@ -110,8 +110,8 @@ int64_t ggsvd3( lapack_int m_ = to_lapack_int( m ); lapack_int n_ = to_lapack_int( n ); lapack_int p_ = to_lapack_int( p ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldu_ = to_lapack_int( ldu ); @@ -183,8 +183,8 @@ int64_t ggsvd3( lapack_int m_ = to_lapack_int( m ); lapack_int n_ = to_lapack_int( n ); lapack_int p_ = to_lapack_int( p ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldu_ = to_lapack_int( ldu ); @@ -260,8 +260,8 @@ int64_t ggsvd3( lapack_int m_ = to_lapack_int( m ); lapack_int n_ = to_lapack_int( n ); lapack_int p_ = to_lapack_int( p ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldu_ = to_lapack_int( ldu ); diff --git a/src/ggsvp3.cc b/src/ggsvp3.cc index cf53ff6c..269e8021 100644 --- a/src/ggsvp3.cc +++ b/src/ggsvp3.cc @@ -38,8 +38,8 @@ int64_t ggsvp3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); @@ -108,8 +108,8 @@ int64_t ggsvp3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); @@ -178,8 +178,8 @@ int64_t ggsvp3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); @@ -252,8 +252,8 @@ int64_t ggsvp3( lapack_int n_ = to_lapack_int( n ); lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); - lapack_int k_ = to_lapack_int( *k ); - lapack_int l_ = to_lapack_int( *l ); + lapack_int k_ = 0; + lapack_int l_ = 0; lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); diff --git a/src/hbevx.cc b/src/hbevx.cc index a27f02c0..2ac50736 100644 --- a/src/hbevx.cc +++ b/src/hbevx.cc @@ -21,7 +21,7 @@ int64_t hbevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, std::complex* AB, int64_t ldab, std::complex* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -35,7 +35,7 @@ int64_t hbevx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -54,7 +54,7 @@ int64_t hbevx( LAPACK_chbevx( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_float*) AB, &ldab_, - (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], @@ -65,10 +65,10 @@ int64_t hbevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -79,7 +79,7 @@ int64_t hbevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, std::complex* AB, int64_t ldab, std::complex* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -93,7 +93,7 @@ int64_t hbevx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -112,7 +112,7 @@ int64_t hbevx( LAPACK_zhbevx( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_double*) AB, &ldab_, - (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], @@ -123,10 +123,10 @@ int64_t hbevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/hbevx_2stage.cc b/src/hbevx_2stage.cc index 2f4fba8c..65e46b92 100644 --- a/src/hbevx_2stage.cc +++ b/src/hbevx_2stage.cc @@ -23,7 +23,7 @@ int64_t hbevx_2stage( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, std::complex* AB, int64_t ldab, std::complex* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -37,7 +37,7 @@ int64_t hbevx_2stage( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -56,7 +56,7 @@ int64_t hbevx_2stage( LAPACK_chbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_float*) AB, &ldab_, - (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) qry_work, &ineg_one, @@ -77,7 +77,7 @@ int64_t hbevx_2stage( LAPACK_chbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_float*) AB, &ldab_, - (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], &lwork_, @@ -88,10 +88,10 @@ int64_t hbevx_2stage( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -102,7 +102,7 @@ int64_t hbevx_2stage( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, std::complex* AB, int64_t ldab, std::complex* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -116,7 +116,7 @@ int64_t hbevx_2stage( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -135,7 +135,7 @@ int64_t hbevx_2stage( LAPACK_zhbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_double*) AB, &ldab_, - (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) qry_work, &ineg_one, @@ -156,7 +156,7 @@ int64_t hbevx_2stage( LAPACK_zhbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, (lapack_complex_double*) AB, &ldab_, - (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], &lwork_, @@ -167,10 +167,10 @@ int64_t hbevx_2stage( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/hbgvx.cc b/src/hbgvx.cc index f9e62e02..38a7d3b3 100644 --- a/src/hbgvx.cc +++ b/src/hbgvx.cc @@ -22,7 +22,7 @@ int64_t hbgvx( std::complex* AB, int64_t ldab, std::complex* BB, int64_t ldbb, std::complex* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -38,7 +38,7 @@ int64_t hbgvx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -58,7 +58,7 @@ int64_t hbgvx( &jobz_, &range_, &uplo_, &n_, &ka_, &kb_, (lapack_complex_float*) AB, &ldab_, (lapack_complex_float*) BB, &ldbb_, - (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], @@ -69,10 +69,10 @@ int64_t hbgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -84,7 +84,7 @@ int64_t hbgvx( std::complex* AB, int64_t ldab, std::complex* BB, int64_t ldbb, std::complex* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -100,7 +100,7 @@ int64_t hbgvx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -120,7 +120,7 @@ int64_t hbgvx( &jobz_, &range_, &uplo_, &n_, &ka_, &kb_, (lapack_complex_double*) AB, &ldab_, (lapack_complex_double*) BB, &ldbb_, - (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], @@ -131,10 +131,10 @@ int64_t hbgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/heevr.cc b/src/heevr.cc index 8f70c152..388a7cb0 100644 --- a/src/heevr.cc +++ b/src/heevr.cc @@ -33,7 +33,7 @@ int64_t heevr( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -301,7 +301,7 @@ int64_t heevr( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/heevr_2stage.cc b/src/heevr_2stage.cc index 0b71b6ef..69f4bd2d 100644 --- a/src/heevr_2stage.cc +++ b/src/heevr_2stage.cc @@ -35,7 +35,7 @@ int64_t heevr_2stage( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -333,7 +333,7 @@ int64_t heevr_2stage( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/heevx.cc b/src/heevx.cc index e11fc266..4b068b66 100644 --- a/src/heevx.cc +++ b/src/heevx.cc @@ -33,7 +33,7 @@ int64_t heevx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -236,7 +236,7 @@ int64_t heevx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/heevx_2stage.cc b/src/heevx_2stage.cc index 599aee4d..fae083ba 100644 --- a/src/heevx_2stage.cc +++ b/src/heevx_2stage.cc @@ -35,7 +35,7 @@ int64_t heevx_2stage( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -268,7 +268,7 @@ int64_t heevx_2stage( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/hegvx.cc b/src/hegvx.cc index 377cd5ed..c7649252 100644 --- a/src/hegvx.cc +++ b/src/hegvx.cc @@ -21,7 +21,7 @@ int64_t hegvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* A, int64_t lda, std::complex* B, int64_t ldb, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -35,7 +35,7 @@ int64_t hegvx( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -54,7 +54,7 @@ int64_t hegvx( LAPACK_chegvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_float*) A, &lda_, - (lapack_complex_float*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) qry_work, &ineg_one, @@ -75,7 +75,7 @@ int64_t hegvx( LAPACK_chegvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_float*) A, &lda_, - (lapack_complex_float*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], &lwork_, @@ -86,10 +86,10 @@ int64_t hegvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -100,7 +100,7 @@ int64_t hegvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* A, int64_t lda, std::complex* B, int64_t ldb, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -114,7 +114,7 @@ int64_t hegvx( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -133,7 +133,7 @@ int64_t hegvx( LAPACK_zhegvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_double*) A, &lda_, - (lapack_complex_double*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) qry_work, &ineg_one, @@ -154,7 +154,7 @@ int64_t hegvx( LAPACK_zhegvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_double*) A, &lda_, - (lapack_complex_double*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], &lwork_, @@ -165,10 +165,10 @@ int64_t hegvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/hpevx.cc b/src/hpevx.cc index 53bcc62d..b8921a73 100644 --- a/src/hpevx.cc +++ b/src/hpevx.cc @@ -20,7 +20,7 @@ using blas::real; int64_t hpevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* AP, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -31,7 +31,7 @@ int64_t hpevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -49,7 +49,7 @@ int64_t hpevx( LAPACK_chpevx( &jobz_, &range_, &uplo_, &n_, - (lapack_complex_float*) AP, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) AP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], @@ -60,10 +60,10 @@ int64_t hpevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -73,7 +73,7 @@ int64_t hpevx( int64_t hpevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* AP, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -84,7 +84,7 @@ int64_t hpevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -102,7 +102,7 @@ int64_t hpevx( LAPACK_zhpevx( &jobz_, &range_, &uplo_, &n_, - (lapack_complex_double*) AP, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) AP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], @@ -113,10 +113,10 @@ int64_t hpevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/hpgvx.cc b/src/hpgvx.cc index ae7670c4..b8aa99df 100644 --- a/src/hpgvx.cc +++ b/src/hpgvx.cc @@ -21,7 +21,7 @@ int64_t hpgvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* AP, std::complex* BP, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -33,7 +33,7 @@ int64_t hpgvx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -52,7 +52,7 @@ int64_t hpgvx( LAPACK_chpgvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_float*) AP, - (lapack_complex_float*) BP, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_float*) BP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, (lapack_complex_float*) &work[0], @@ -63,10 +63,10 @@ int64_t hpgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -77,7 +77,7 @@ int64_t hpgvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, std::complex* AP, std::complex* BP, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* ifail ) @@ -89,7 +89,7 @@ int64_t hpgvx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -108,7 +108,7 @@ int64_t hpgvx( LAPACK_zhpgvx( &itype_, &jobz_, &range_, &uplo_, &n_, (lapack_complex_double*) AP, - (lapack_complex_double*) BP, &vl, &vu, &il_, &iu_, &abstol, &m_, + (lapack_complex_double*) BP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, (lapack_complex_double*) &work[0], @@ -119,10 +119,10 @@ int64_t hpgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/posv.cc b/src/posv.cc index 1e0cbae0..11434cb9 100644 --- a/src/posv.cc +++ b/src/posv.cc @@ -189,7 +189,7 @@ int64_t posv( lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldx_ = to_lapack_int( ldx ); - lapack_int iter_ = to_lapack_int( *iter ); + lapack_int iter_ = 0; lapack_int info_ = 0; // allocate workspace @@ -225,7 +225,7 @@ int64_t posv( lapack_int lda_ = to_lapack_int( lda ); lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldx_ = to_lapack_int( ldx ); - lapack_int iter_ = to_lapack_int( *iter ); + lapack_int iter_ = 0; lapack_int info_ = 0; // allocate workspace diff --git a/src/pstrf.cc b/src/pstrf.cc index ca79a5bc..376cb00e 100644 --- a/src/pstrf.cc +++ b/src/pstrf.cc @@ -33,7 +33,7 @@ int64_t pstrf( #else lapack_int* piv_ptr = piv; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // allocate workspace @@ -72,7 +72,7 @@ int64_t pstrf( #else lapack_int* piv_ptr = piv; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // allocate workspace @@ -111,7 +111,7 @@ int64_t pstrf( #else lapack_int* piv_ptr = piv; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // allocate workspace @@ -150,7 +150,7 @@ int64_t pstrf( #else lapack_int* piv_ptr = piv; #endif - lapack_int rank_ = to_lapack_int( *rank ); + lapack_int rank_ = 0; lapack_int info_ = 0; // allocate workspace diff --git a/src/sbevx.cc b/src/sbevx.cc index d3338308..b47152f6 100644 --- a/src/sbevx.cc +++ b/src/sbevx.cc @@ -21,7 +21,7 @@ int64_t sbevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, float* AB, int64_t ldab, float* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -35,7 +35,7 @@ int64_t sbevx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -53,7 +53,7 @@ int64_t sbevx( LAPACK_ssbevx( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -63,10 +63,10 @@ int64_t sbevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -77,7 +77,7 @@ int64_t sbevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, double* AB, int64_t ldab, double* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -91,7 +91,7 @@ int64_t sbevx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -109,7 +109,7 @@ int64_t sbevx( LAPACK_dsbevx( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -119,10 +119,10 @@ int64_t sbevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/sbevx_2stage.cc b/src/sbevx_2stage.cc index 963db7fd..548a91b2 100644 --- a/src/sbevx_2stage.cc +++ b/src/sbevx_2stage.cc @@ -23,7 +23,7 @@ int64_t sbevx_2stage( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, float* AB, int64_t ldab, float* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -37,7 +37,7 @@ int64_t sbevx_2stage( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -55,7 +55,7 @@ int64_t sbevx_2stage( LAPACK_ssbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, qry_work, &ineg_one, @@ -74,7 +74,7 @@ int64_t sbevx_2stage( LAPACK_ssbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], &lwork_, @@ -84,10 +84,10 @@ int64_t sbevx_2stage( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -98,7 +98,7 @@ int64_t sbevx_2stage( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, int64_t kd, double* AB, int64_t ldab, double* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -112,7 +112,7 @@ int64_t sbevx_2stage( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -130,7 +130,7 @@ int64_t sbevx_2stage( LAPACK_dsbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, qry_work, &ineg_one, @@ -149,7 +149,7 @@ int64_t sbevx_2stage( LAPACK_dsbevx_2stage( &jobz_, &range_, &uplo_, &n_, &kd_, AB, &ldab_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], &lwork_, @@ -159,10 +159,10 @@ int64_t sbevx_2stage( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/sbgvx.cc b/src/sbgvx.cc index a806cbab..b31f2936 100644 --- a/src/sbgvx.cc +++ b/src/sbgvx.cc @@ -22,7 +22,7 @@ int64_t sbgvx( float* AB, int64_t ldab, float* BB, int64_t ldbb, float* Q, int64_t ldq, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -38,11 +38,11 @@ int64_t sbgvx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > ifail_( n ); // was m; n >= m + lapack::vector< lapack_int > ifail_( n ); // was nfound; n >= nfound lapack_int* ifail_ptr = &ifail_[0]; #else lapack_int* ifail_ptr = ifail; @@ -57,7 +57,7 @@ int64_t sbgvx( &jobz_, &range_, &uplo_, &n_, &ka_, &kb_, AB, &ldab_, BB, &ldbb_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -67,10 +67,10 @@ int64_t sbgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -82,7 +82,7 @@ int64_t sbgvx( double* AB, int64_t ldab, double* BB, int64_t ldbb, double* Q, int64_t ldq, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -98,11 +98,11 @@ int64_t sbgvx( lapack_int ldq_ = to_lapack_int( ldq ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > ifail_( n ); // was m; n >= m + lapack::vector< lapack_int > ifail_( n ); // was nfound; n >= nfound lapack_int* ifail_ptr = &ifail_[0]; #else lapack_int* ifail_ptr = ifail; @@ -117,7 +117,7 @@ int64_t sbgvx( &jobz_, &range_, &uplo_, &n_, &ka_, &kb_, AB, &ldab_, BB, &ldbb_, - Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &m_, + Q, &ldq_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -127,10 +127,10 @@ int64_t sbgvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/spevx.cc b/src/spevx.cc index 0c446061..12eb4ec4 100644 --- a/src/spevx.cc +++ b/src/spevx.cc @@ -20,7 +20,7 @@ using blas::real; int64_t spevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, float* AP, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -31,7 +31,7 @@ int64_t spevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -48,7 +48,7 @@ int64_t spevx( LAPACK_sspevx( &jobz_, &range_, &uplo_, &n_, - AP, &vl, &vu, &il_, &iu_, &abstol, &m_, + AP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -58,10 +58,10 @@ int64_t spevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -71,7 +71,7 @@ int64_t spevx( int64_t spevx( lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, double* AP, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -82,7 +82,7 @@ int64_t spevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -99,7 +99,7 @@ int64_t spevx( LAPACK_dspevx( &jobz_, &range_, &uplo_, &n_, - AP, &vl, &vu, &il_, &iu_, &abstol, &m_, + AP, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -109,10 +109,10 @@ int64_t spevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/spgvx.cc b/src/spgvx.cc index 53533c8e..082c9497 100644 --- a/src/spgvx.cc +++ b/src/spgvx.cc @@ -33,7 +33,7 @@ int64_t spgvx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -87,7 +87,7 @@ int64_t spgvx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/stegr.cc b/src/stegr.cc index 64fdc42a..b4a0473d 100644 --- a/src/stegr.cc +++ b/src/stegr.cc @@ -21,7 +21,7 @@ int64_t stegr( lapack::Job jobz, lapack::Range range, int64_t n, float* D, float* E, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* isuppz ) @@ -31,11 +31,11 @@ int64_t stegr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -49,7 +49,7 @@ int64_t stegr( LAPACK_sstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, isuppz_ptr, @@ -69,7 +69,7 @@ int64_t stegr( LAPACK_sstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, isuppz_ptr, @@ -79,9 +79,9 @@ int64_t stegr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); // was begin to end #endif return info_; } @@ -91,7 +91,7 @@ int64_t stegr( lapack::Job jobz, lapack::Range range, int64_t n, double* D, double* E, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* isuppz ) @@ -101,11 +101,11 @@ int64_t stegr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = to_lapack_int( *nfound ); lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -119,7 +119,7 @@ int64_t stegr( LAPACK_dstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, isuppz_ptr, @@ -139,7 +139,7 @@ int64_t stegr( LAPACK_dstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, isuppz_ptr, @@ -149,9 +149,9 @@ int64_t stegr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); // was begin to end #endif return info_; } @@ -161,7 +161,7 @@ int64_t stegr( lapack::Job jobz, lapack::Range range, int64_t n, float* D, float* E, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t* isuppz ) @@ -171,11 +171,11 @@ int64_t stegr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -189,7 +189,7 @@ int64_t stegr( LAPACK_cstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, isuppz_ptr, @@ -209,7 +209,7 @@ int64_t stegr( LAPACK_cstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_float*) Z, &ldz_, isuppz_ptr, @@ -219,9 +219,9 @@ int64_t stegr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); // was begin to end #endif return info_; } @@ -231,7 +231,7 @@ int64_t stegr( lapack::Job jobz, lapack::Range range, int64_t n, double* D, double* E, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t* isuppz ) @@ -241,11 +241,11 @@ int64_t stegr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -259,7 +259,7 @@ int64_t stegr( LAPACK_zstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, isuppz_ptr, @@ -279,7 +279,7 @@ int64_t stegr( LAPACK_zstegr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, (lapack_complex_double*) Z, &ldz_, isuppz_ptr, @@ -289,9 +289,9 @@ int64_t stegr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); // was begin to end #endif return info_; } diff --git a/src/stemr.cc b/src/stemr.cc index db3cc699..6edc32f8 100644 --- a/src/stemr.cc +++ b/src/stemr.cc @@ -21,7 +21,7 @@ int64_t stemr( lapack::Job jobz, lapack::Range range, int64_t n, float* D, float* E, float vl, float vu, int64_t il, int64_t iu, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t nzc, int64_t* isuppz, @@ -32,12 +32,12 @@ int64_t stemr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int nzc_ = to_lapack_int( nzc ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -52,7 +52,7 @@ int64_t stemr( LAPACK_sstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -72,7 +72,7 @@ int64_t stemr( LAPACK_sstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -82,9 +82,9 @@ int64_t stemr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); #endif *tryrac = tryrac_; return info_; @@ -95,7 +95,7 @@ int64_t stemr( lapack::Job jobz, lapack::Range range, int64_t n, double* D, double* E, double vl, double vu, int64_t il, int64_t iu, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t nzc, int64_t* isuppz, @@ -106,12 +106,12 @@ int64_t stemr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int nzc_ = to_lapack_int( nzc ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -126,7 +126,7 @@ int64_t stemr( LAPACK_dstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -146,7 +146,7 @@ int64_t stemr( LAPACK_dstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -156,9 +156,9 @@ int64_t stemr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); #endif *tryrac = tryrac_; return info_; @@ -169,7 +169,7 @@ int64_t stemr( lapack::Job jobz, lapack::Range range, int64_t n, float* D, float* E, float vl, float vu, int64_t il, int64_t iu, - int64_t* m, + int64_t* nfound, float* W, std::complex* Z, int64_t ldz, int64_t nzc, int64_t* isuppz, @@ -180,12 +180,12 @@ int64_t stemr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int nzc_ = to_lapack_int( nzc ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -200,7 +200,7 @@ int64_t stemr( LAPACK_cstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, (lapack_complex_float*) Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -220,7 +220,7 @@ int64_t stemr( LAPACK_cstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, (lapack_complex_float*) Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -230,9 +230,9 @@ int64_t stemr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); #endif *tryrac = tryrac_; return info_; @@ -243,7 +243,7 @@ int64_t stemr( lapack::Job jobz, lapack::Range range, int64_t n, double* D, double* E, double vl, double vu, int64_t il, int64_t iu, - int64_t* m, + int64_t* nfound, double* W, std::complex* Z, int64_t ldz, int64_t nzc, int64_t* isuppz, @@ -254,12 +254,12 @@ int64_t stemr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); lapack_int nzc_ = to_lapack_int( nzc ); #ifndef LAPACK_ILP64 // 32-bit copy - lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was m; n >= m + lapack::vector< lapack_int > isuppz_( (2*max( 1, n )) ); // was nfound; n >= nfound lapack_int* isuppz_ptr = &isuppz_[0]; #else lapack_int* isuppz_ptr = isuppz; @@ -274,7 +274,7 @@ int64_t stemr( LAPACK_zstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, (lapack_complex_double*) Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -294,7 +294,7 @@ int64_t stemr( LAPACK_zstemr( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &m_, + E, &vl, &vu, &il_, &iu_, &nfound_, W, (lapack_complex_double*) Z, &ldz_, &nzc_, isuppz_ptr, &tryrac_, @@ -304,9 +304,9 @@ int64_t stemr( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 - std::copy( &isuppz_[0], &isuppz_[m_], isuppz ); // was begin to end + std::copy( &isuppz_[0], &isuppz_[ nfound_ ], isuppz ); #endif *tryrac = tryrac_; return info_; diff --git a/src/stevr.cc b/src/stevr.cc index a74bcad9..dafafb23 100644 --- a/src/stevr.cc +++ b/src/stevr.cc @@ -31,7 +31,7 @@ int64_t stevr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -101,7 +101,7 @@ int64_t stevr( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/stevx.cc b/src/stevx.cc index b70b8836..778b441d 100644 --- a/src/stevx.cc +++ b/src/stevx.cc @@ -21,7 +21,7 @@ int64_t stevx( lapack::Job jobz, lapack::Range range, int64_t n, float* D, float* E, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -31,7 +31,7 @@ int64_t stevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -49,7 +49,7 @@ int64_t stevx( LAPACK_sstevx( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -59,10 +59,10 @@ int64_t stevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -73,7 +73,7 @@ int64_t stevx( lapack::Job jobz, lapack::Range range, int64_t n, double* D, double* E, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -83,7 +83,7 @@ int64_t stevx( lapack_int n_ = to_lapack_int( n ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -101,7 +101,7 @@ int64_t stevx( LAPACK_dstevx( &jobz_, &range_, &n_, D, - E, &vl, &vu, &il_, &iu_, &abstol, &m_, + E, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], @@ -111,10 +111,10 @@ int64_t stevx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/syevx.cc b/src/syevx.cc index 16913341..dfef6466 100644 --- a/src/syevx.cc +++ b/src/syevx.cc @@ -33,7 +33,7 @@ int64_t syevx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -105,7 +105,7 @@ int64_t syevx( lapack_int lda_ = to_lapack_int( lda ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int nfound_ = to_lapack_int( *nfound ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy diff --git a/src/sygvx.cc b/src/sygvx.cc index 2b237e1b..c71f297c 100644 --- a/src/sygvx.cc +++ b/src/sygvx.cc @@ -21,7 +21,7 @@ int64_t sygvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, float* A, int64_t lda, float* B, int64_t ldb, float vl, float vu, int64_t il, int64_t iu, float abstol, - int64_t* m, + int64_t* nfound, float* W, float* Z, int64_t ldz, int64_t* ifail ) @@ -35,7 +35,7 @@ int64_t sygvx( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -53,7 +53,7 @@ int64_t sygvx( LAPACK_ssygvx( &itype_, &jobz_, &range_, &uplo_, &n_, A, &lda_, - B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, qry_work, &ineg_one, @@ -72,7 +72,7 @@ int64_t sygvx( LAPACK_ssygvx( &itype_, &jobz_, &range_, &uplo_, &n_, A, &lda_, - B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], &lwork_, @@ -82,10 +82,10 @@ int64_t sygvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; @@ -96,7 +96,7 @@ int64_t sygvx( int64_t itype, lapack::Job jobz, lapack::Range range, lapack::Uplo uplo, int64_t n, double* A, int64_t lda, double* B, int64_t ldb, double vl, double vu, int64_t il, int64_t iu, double abstol, - int64_t* m, + int64_t* nfound, double* W, double* Z, int64_t ldz, int64_t* ifail ) @@ -110,7 +110,7 @@ int64_t sygvx( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int il_ = to_lapack_int( il ); lapack_int iu_ = to_lapack_int( iu ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int ldz_ = to_lapack_int( ldz ); #ifndef LAPACK_ILP64 // 32-bit copy @@ -128,7 +128,7 @@ int64_t sygvx( LAPACK_dsygvx( &itype_, &jobz_, &range_, &uplo_, &n_, A, &lda_, - B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, qry_work, &ineg_one, @@ -147,7 +147,7 @@ int64_t sygvx( LAPACK_dsygvx( &itype_, &jobz_, &range_, &uplo_, &n_, A, &lda_, - B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &m_, + B, &ldb_, &vl, &vu, &il_, &iu_, &abstol, &nfound_, W, Z, &ldz_, &work[0], &lwork_, @@ -157,10 +157,10 @@ int64_t sygvx( if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; #ifndef LAPACK_ILP64 if (jobz != Job::NoVec) { - std::copy( &ifail_[ 0 ], &ifail_[ m_ ], ifail ); + std::copy( &ifail_[ 0 ], &ifail_[ nfound_ ], ifail ); } #endif return info_; diff --git a/src/tgexc.cc b/src/tgexc.cc index 15da45fa..5c99ffe5 100644 --- a/src/tgexc.cc +++ b/src/tgexc.cc @@ -118,9 +118,6 @@ int64_t tgexc( scalar_t* Z, int64_t ldz, int64_t* ifst, int64_t* ilst ) { - // convert arguments - if (sizeof(int64_t) > sizeof(lapack_int)) { - } lapack_int wantq_ = to_lapack_int( wantq ); lapack_int wantz_ = to_lapack_int( wantz ); lapack_int n_ = to_lapack_int( n ); @@ -128,8 +125,8 @@ int64_t tgexc( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldq_ = to_lapack_int( ldq ); lapack_int ldz_ = to_lapack_int( ldz ); - lapack_int ifst_ = to_lapack_int( *ifst ); - lapack_int ilst_ = to_lapack_int( *ilst ); + lapack_int ifst_ = to_lapack_int( *ifst ); // in,out + lapack_int ilst_ = to_lapack_int( *ilst ); // in,out lapack_int info_ = 0; if constexpr (! is_complex::value) { diff --git a/src/tgsen.cc b/src/tgsen.cc index 2f08d998..1090f8f7 100644 --- a/src/tgsen.cc +++ b/src/tgsen.cc @@ -152,9 +152,6 @@ int64_t tgsen( real_type* pl, real_type* pr, real_type* dif ) { - // convert arguments - if (sizeof(int64_t) > sizeof(lapack_int)) { - } lapack_int ijob_ = to_lapack_int( ijob ); lapack_int wantq_ = to_lapack_int( wantq ); lapack_int wantz_ = to_lapack_int( wantz ); @@ -163,7 +160,7 @@ int64_t tgsen( lapack_int ldb_ = to_lapack_int( ldb ); lapack_int ldq_ = to_lapack_int( ldq ); lapack_int ldz_ = to_lapack_int( ldz ); - lapack_int sdim_ = to_lapack_int( *sdim ); + lapack_int sdim_ = 0; lapack_int info_ = 0; // For real, create vectors for split-complex representation. diff --git a/src/tgsja.cc b/src/tgsja.cc index c2665f2f..a924f60c 100644 --- a/src/tgsja.cc +++ b/src/tgsja.cc @@ -41,7 +41,7 @@ int64_t tgsja( lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ncycle_ = to_lapack_int( *ncycle ); + lapack_int ncycle_ = 0; lapack_int info_ = 0; // allocate workspace @@ -90,7 +90,7 @@ int64_t tgsja( lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ncycle_ = to_lapack_int( *ncycle ); + lapack_int ncycle_ = 0; lapack_int info_ = 0; // allocate workspace @@ -139,7 +139,7 @@ int64_t tgsja( lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ncycle_ = to_lapack_int( *ncycle ); + lapack_int ncycle_ = 0; lapack_int info_ = 0; // allocate workspace @@ -188,7 +188,7 @@ int64_t tgsja( lapack_int ldu_ = to_lapack_int( ldu ); lapack_int ldv_ = to_lapack_int( ldv ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ncycle_ = to_lapack_int( *ncycle ); + lapack_int ncycle_ = 0; lapack_int info_ = 0; // allocate workspace diff --git a/src/trevc.cc b/src/trevc.cc index 39005aca..cda445b8 100644 --- a/src/trevc.cc +++ b/src/trevc.cc @@ -24,7 +24,7 @@ int64_t trevc( float const* T, int64_t ldt, float* VL, int64_t ldvl, float* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -38,7 +38,7 @@ int64_t trevc( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // allocate workspace @@ -49,7 +49,7 @@ int64_t trevc( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, &work[0], &info_ ); if (info_ < 0) { @@ -57,7 +57,7 @@ int64_t trevc( } // [sd]trevc update select std::copy( select_.begin(), select_.end(), select ); - *m = m_; + *nfound = nfound_; return info_; } @@ -69,7 +69,7 @@ int64_t trevc( double const* T, int64_t ldt, double* VL, int64_t ldvl, double* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -83,7 +83,7 @@ int64_t trevc( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // allocate workspace @@ -94,7 +94,7 @@ int64_t trevc( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, &work[0], &info_ ); if (info_ < 0) { @@ -102,7 +102,7 @@ int64_t trevc( } // [sd]trevc update select std::copy( select_.begin(), select_.end(), select ); - *m = m_; + *nfound = nfound_; return info_; } @@ -114,7 +114,7 @@ int64_t trevc( std::complex* T, int64_t ldt, std::complex* VL, int64_t ldvl, std::complex* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -128,7 +128,7 @@ int64_t trevc( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // allocate workspace @@ -140,14 +140,14 @@ int64_t trevc( select_ptr, &n_, (lapack_complex_float*) T, &ldt_, (lapack_complex_float*) VL, &ldvl_, - (lapack_complex_float*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_float*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_float*) &work[0], &rwork[0], &info_ ); if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; return info_; } @@ -253,12 +253,12 @@ int64_t trevc( /// ldvr >= 1, and if side = Right or Both, ldvr >= n. /// /// @param[in] mm -/// The number of columns in the arrays VL and/or VR. mm >= m. +/// The number of columns in the arrays VL and/or VR. mm >= nfound. /// -/// @param[out] m +/// @param[out] nfound /// The number of columns in the arrays VL and/or VR actually /// used to store the eigenvectors. -/// If howmany = All or Backtransform, m is set to n. +/// If howmany = All or Backtransform, nfound is set to n. /// Each selected eigenvector occupies one column. /// /// @return = 0: successful exit @@ -281,7 +281,7 @@ int64_t trevc( std::complex* T, int64_t ldt, std::complex* VL, int64_t ldvl, std::complex* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -295,7 +295,7 @@ int64_t trevc( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // allocate workspace @@ -307,14 +307,14 @@ int64_t trevc( select_ptr, &n_, (lapack_complex_double*) T, &ldt_, (lapack_complex_double*) VL, &ldvl_, - (lapack_complex_double*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_double*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_double*) &work[0], &rwork[0], &info_ ); if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; return info_; } diff --git a/src/trevc3.cc b/src/trevc3.cc index f8e8fc7d..def85eae 100644 --- a/src/trevc3.cc +++ b/src/trevc3.cc @@ -27,7 +27,7 @@ int64_t trevc3( float const* T, int64_t ldt, float* VL, int64_t ldvl, float* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -41,7 +41,7 @@ int64_t trevc3( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // query for workspace size @@ -52,7 +52,7 @@ int64_t trevc3( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, qry_work, &ineg_one, &info_ ); if (info_ < 0) { @@ -68,7 +68,7 @@ int64_t trevc3( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, &work[0], &lwork_, &info_ ); if (info_ < 0) { @@ -76,7 +76,7 @@ int64_t trevc3( } // [sd]trevc update select std::copy( select_.begin(), select_.end(), select ); - *m = m_; + *nfound = nfound_; return info_; } @@ -88,7 +88,7 @@ int64_t trevc3( double const* T, int64_t ldt, double* VL, int64_t ldvl, double* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -102,7 +102,7 @@ int64_t trevc3( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // query for workspace size @@ -113,7 +113,7 @@ int64_t trevc3( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, qry_work, &ineg_one, &info_ ); if (info_ < 0) { @@ -129,7 +129,7 @@ int64_t trevc3( select_ptr, &n_, T, &ldt_, VL, &ldvl_, - VR, &ldvr_, &mm_, &m_, + VR, &ldvr_, &mm_, &nfound_, &work[0], &lwork_, &info_ ); if (info_ < 0) { @@ -137,7 +137,7 @@ int64_t trevc3( } // [sd]trevc update select std::copy( select_.begin(), select_.end(), select ); - *m = m_; + *nfound = nfound_; return info_; } @@ -149,7 +149,7 @@ int64_t trevc3( std::complex* T, int64_t ldt, std::complex* VL, int64_t ldvl, std::complex* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -163,7 +163,7 @@ int64_t trevc3( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // query for workspace size @@ -175,7 +175,7 @@ int64_t trevc3( select_ptr, &n_, (lapack_complex_float*) T, &ldt_, (lapack_complex_float*) VL, &ldvl_, - (lapack_complex_float*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_float*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_float*) qry_work, &ineg_one, qry_rwork, &ineg_one, &info_ ); @@ -194,14 +194,14 @@ int64_t trevc3( select_ptr, &n_, (lapack_complex_float*) T, &ldt_, (lapack_complex_float*) VL, &ldvl_, - (lapack_complex_float*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_float*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_float*) &work[0], &lwork_, &rwork[0], &lrwork_, &info_ ); if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; return info_; } @@ -309,12 +309,12 @@ int64_t trevc3( /// ldvr >= 1, and if side = Right or Both, ldvr >= n. /// /// @param[in] mm -/// The number of columns in the arrays VL and/or VR. mm >= m. +/// The number of columns in the arrays VL and/or VR. mm >= nfound. /// -/// @param[out] m +/// @param[out] nfound /// The number of columns in the arrays VL and/or VR actually /// used to store the eigenvectors. -/// If howmany = All or Backtransform, m is set to n. +/// If howmany = All or Backtransform, nfound is set to n. /// Each selected eigenvector occupies one column. /// /// @return = 0: successful exit @@ -337,7 +337,7 @@ int64_t trevc3( std::complex* T, int64_t ldt, std::complex* VL, int64_t ldvl, std::complex* VR, int64_t ldvr, int64_t mm, - int64_t* m ) + int64_t* nfound ) { char sides_ = to_char( sides ); char howmany_ = to_char( howmany ); @@ -351,7 +351,7 @@ int64_t trevc3( lapack_int ldvl_ = to_lapack_int( ldvl ); lapack_int ldvr_ = to_lapack_int( ldvr ); lapack_int mm_ = to_lapack_int( mm ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int nfound_ = 0; lapack_int info_ = 0; // query for workspace size @@ -363,7 +363,7 @@ int64_t trevc3( select_ptr, &n_, (lapack_complex_double*) T, &ldt_, (lapack_complex_double*) VL, &ldvl_, - (lapack_complex_double*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_double*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_double*) qry_work, &ineg_one, qry_rwork, &ineg_one, &info_ ); @@ -382,14 +382,14 @@ int64_t trevc3( select_ptr, &n_, (lapack_complex_double*) T, &ldt_, (lapack_complex_double*) VL, &ldvl_, - (lapack_complex_double*) VR, &ldvr_, &mm_, &m_, + (lapack_complex_double*) VR, &ldvr_, &mm_, &nfound_, (lapack_complex_double*) &work[0], &lwork_, &rwork[0], &lrwork_, &info_ ); if (info_ < 0) { throw Error(); } - *m = m_; + *nfound = nfound_; return info_; } diff --git a/src/trexc.cc b/src/trexc.cc index 647f488b..a57e8f11 100644 --- a/src/trexc.cc +++ b/src/trexc.cc @@ -28,8 +28,8 @@ int64_t trexc( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ifst_ = to_lapack_int( *ifst ); - lapack_int ilst_ = to_lapack_int( *ilst ); + lapack_int ifst_ = to_lapack_int( *ifst ); // in,out + lapack_int ilst_ = to_lapack_int( *ilst ); // in,out lapack_int info_ = 0; // allocate workspace @@ -61,8 +61,8 @@ int64_t trexc( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int ifst_ = to_lapack_int( *ifst ); - lapack_int ilst_ = to_lapack_int( *ilst ); + lapack_int ifst_ = to_lapack_int( *ifst ); // in,out + lapack_int ilst_ = to_lapack_int( *ilst ); // in,out lapack_int info_ = 0; // allocate workspace @@ -92,6 +92,7 @@ int64_t trexc( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); + // In complex, ifst, ilst are in only, not in,out. lapack_int ifst_ = to_lapack_int( ifst ); lapack_int ilst_ = to_lapack_int( ilst ); lapack_int info_ = 0; @@ -117,6 +118,7 @@ int64_t trexc( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); + // In complex, ifst, ilst are in only, not in,out. lapack_int ifst_ = to_lapack_int( ifst ); lapack_int ilst_ = to_lapack_int( ilst ); lapack_int info_ = 0; diff --git a/src/trsen.cc b/src/trsen.cc index 6846fa24..31694c41 100644 --- a/src/trsen.cc +++ b/src/trsen.cc @@ -37,7 +37,7 @@ int64_t trsen( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int info_ = 0; // split-complex representation @@ -112,7 +112,7 @@ int64_t trsen( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int info_ = 0; // split-complex representation @@ -187,7 +187,7 @@ int64_t trsen( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int info_ = 0; // query for workspace size @@ -245,7 +245,7 @@ int64_t trsen( lapack_int n_ = to_lapack_int( n ); lapack_int ldt_ = to_lapack_int( ldt ); lapack_int ldq_ = to_lapack_int( ldq ); - lapack_int m_ = to_lapack_int( *m ); + lapack_int m_ = 0; lapack_int info_ = 0; // query for workspace size diff --git a/tools/wrapper_gen.py b/tools/wrapper_gen.py index b7c2ca66..cf3d4aab 100755 --- a/tools/wrapper_gen.py +++ b/tools/wrapper_gen.py @@ -157,7 +157,9 @@ // the terms of the BSD 3-Clause license. See the accompanying LICENSE file. #include "lapack.hh" +#include "lapack_internal.hh" #include "lapack/fortran.h" +#include "NoConstructAllocator.hh" ''' @@ -1061,7 +1063,8 @@ def parse_lapack( path ): # dimensions, enums arg.lname += '_' arg.pname = '&' + arg.lname - elif (arg.intent in ('out', 'in,out') and not arg.is_array and arg.dtype in ('int64_t', 'bool')): + elif (arg.intent in ('out', 'in,out') and not arg.is_array + and arg.dtype in ('int64_t', 'bool')): # output dimensions (nfound, rank, ...) arg.lname += '_' arg.pname = '&' + arg.lname @@ -1367,9 +1370,9 @@ def generate_wrapper( func, header=False ): query_args.append( prefix + cast + arg.pname ) if (arg.dtype in ('int64_t', 'bool')): # integer input arrays: copy in input - local_vars += (tab + '#if 1\n' + local_vars += (tab + '#ifndef LAPACK_ILP64\n' + tab*2 + '// 32-bit copy\n' - + tab*2 + 'std::vector< lapack_int > ' + arg.lname + '( &' + arg.name + '[0], &' + arg.name + '[' + arg.dim + '] );\n' + + tab*2 + 'lapack::vector< lapack_int > ' + arg.lname + '( &' + arg.name + '[0], &' + arg.name + '[' + arg.dim + '] );\n' + tab*2 + 'lapack_int const* ' + arg.pname + ' = &' + arg.lname + '[0];\n' + tab + '#else\n' + tab*2 + 'lapack_int const* ' + arg.pname + ' = ' + arg.lname + ';\n' @@ -1391,7 +1394,7 @@ def generate_wrapper( func, header=False ): local_vars += tab + 'lapack_int ' + arg.lname + ' = to_lapack_int( ' + arg.name + ' );\n' elif (arg.is_enum): enum2char = enum_map[ arg.name ][1] - local_vars += tab + 'char ' + arg.lname + ' = ' + enum2char + '( ' + arg.name + ' );\n' + local_vars += tab + 'char ' + arg.lname + ' = to_char( ' + arg.name + ' );\n' # end # end else: @@ -1400,10 +1403,11 @@ def generate_wrapper( func, header=False ): query_args.append( prefix + cast + 'qry_' + arg.name ) query += tab + arg.dtype + ' qry_' + arg.name + '[1];\n' + alloc_work += tab + 'lapack::vector< ' + arg.dtype + ' > ' + arg.lname if (arg.use_query): - alloc_work += tab + 'std::vector< ' + arg.dtype + ' > ' + arg.lname + '( ' + func.args[i+1].lname + ' );\n' + alloc_work += '( ' + func.args[i+1].lname + ' );\n' else: - alloc_work += tab + 'std::vector< ' + arg.dtype + ' > ' + arg.lname + '( ' + arg.dim.lower() + ' );\n' + alloc_work += '( ' + arg.dim.lower() + ' );\n' ##alloc_work += (tab + arg.dtype + '* ' + arg.name + '_' ## + ' = new ' + arg.dtype + '[ l' + arg.name + ' ];\n') @@ -1422,7 +1426,11 @@ def generate_wrapper( func, header=False ): else: proto_args.append( '\n ' + arg.dtype + '* ' + arg.name ) alias_args.append( arg.name ) - local_vars += tab + 'lapack_int ' + arg.lname + ' = to_lapack_int( *' + arg.name + ' );\n' + local_vars += tab + 'lapack_int ' + arg.lname + ' = ' + if (arg.intent == 'out'): + local_vars += '0;\n' + else: # in,out + local_vars += 'to_lapack_int( *' + arg.name + ' ); // in,out\n' cleanup += tab + '*' + arg.name + ' = ' + arg.lname + ';\n' else: # output array @@ -1432,24 +1440,24 @@ def generate_wrapper( func, header=False ): if (arg.is_array and (arg.dtype in ('int64_t', 'bool'))): if (arg.intent == 'in,out'): # copy in input, copy out in cleanup - local_vars += (tab + '#if 1\n' + local_vars += (tab + '#ifndef LAPACK_ILP64\n' + tab*2 + '// 32-bit copy\n' - + tab*2 + 'std::vector< lapack_int > ' + arg.lname + '( &' + arg.name + '[0], &' + arg.name + '[' + arg.dim + '] );\n' + + tab*2 + 'lapack::vector< lapack_int > ' + arg.lname + '( &' + arg.name + '[0], &' + arg.name + '[' + arg.dim + '] );\n' + tab*2 + 'lapack_int* ' + arg.pname + ' = &' + arg.lname + '[0];\n' + tab + '#else\n' + tab*2 + 'lapack_int* ' + arg.pname + ' = ' + arg.name + ';\n' + tab + '#endif\n') else: # allocate w/o copy, copy out in cleanup - local_vars += (tab + '#if 1\n' + local_vars += (tab + '#ifndef LAPACK_ILP64\n' + tab*2 + '// 32-bit copy\n' - + tab*2 + 'std::vector< lapack_int > ' + arg.lname + '( ' + arg.dim + ' );\n' + + tab*2 + 'lapack::vector< lapack_int > ' + arg.lname + '( ' + arg.dim + ' );\n' + tab*2 + 'lapack_int* ' + arg.pname + ' = &' + arg.lname + '[0];\n' + tab + '#else\n' + tab*2 + 'lapack_int* ' + arg.pname + ' = ' + arg.name + ';\n' + tab + '#endif\n') # end - cleanup += (tab + '#if 1\n' + cleanup += (tab + '#ifndef LAPACK_ILP64\n' + tab*2 + 'std::copy( ' + arg.lname + '.begin(), ' + arg.lname + '.end(), ' + arg.name + ' );\n' + tab + '#endif\n') # end @@ -1457,14 +1465,16 @@ def generate_wrapper( func, header=False ): i += 1 # end - # -------------------- + #-------------------- # build query if (use_query): query = ('\n' + tab + '// query for workspace size\n' + query + tab + 'lapack_int ineg_one = -1;\n' - + tab + 'LAPACK_' + func.xname + '(\n' + tab*2 + ', '.join( query_args ) + ' );\n' + + tab + 'LAPACK_' + func.xname + '(\n' + tab*2 + + ', '.join( query_args ) + '\n' + + tab + ');\n' + tab + 'if (info_ < 0) {\n' + tab*2 + 'throw Error();\n' + tab + '}\n') @@ -1479,19 +1489,27 @@ def generate_wrapper( func, header=False ): query = '' # end + #-------------------- if (alloc_work): alloc_work = ('\n' + tab + '// allocate workspace\n' + alloc_work) # end + #-------------------- + # function call if (func.is_func): - call = '\n' + tab + 'return LAPACK_' + func.xname + '(\n' + tab*2 + ', '.join( call_args ) + ' );\n' + call = ('\n' + tab + 'return LAPACK_' + func.xname + '(\n' + + tab*2 + ', '.join( call_args ) + '\n' + + tab + ');\n') if (info_throw or cleanup or info_return): print( 'Warning: why is info or cleanup on a function?' ) else: - call = '\n' + tab + 'LAPACK_' + func.xname + '(\n' + tab*2 + ', '.join( call_args ) + ' );\n' + call = ('\n' + tab + 'LAPACK_' + func.xname + '(\n' + + tab*2 + ', '.join( call_args ) + '\n' + + tab + ');\n') + #-------------------- if (header): txt = (func.retval + ' ' + func.name + '(\n' + tab + ', '.join( proto_args )