Make LAPACKE_[cz]tgexc pass ifst/ilst as pointer outputs
Per LAPACK docs, in [cz]tgexc, ilst is [in,out]. The LAPACKE C interface was passing both ifst and ilst by value as input-only scalars, so callers could never observe the updated ilst value. Change both ifst and ilst to lapack_int* pointers in the complex tgexc variants to match the real-precision stgexc/dtgexc interface and the underlying Fortran semantics. Fixes #771
This commit is contained in:
@@ -4153,14 +4153,14 @@ lapack_int LAPACKE_ctgexc( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_float* b, lapack_int ldb,
|
||||
lapack_complex_float* q, lapack_int ldq,
|
||||
lapack_complex_float* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst );
|
||||
lapack_int ifst, lapack_int* ilst );
|
||||
lapack_int LAPACKE_ztgexc( int matrix_layout, lapack_logical wantq,
|
||||
lapack_logical wantz, lapack_int n,
|
||||
lapack_complex_double* a, lapack_int lda,
|
||||
lapack_complex_double* b, lapack_int ldb,
|
||||
lapack_complex_double* q, lapack_int ldq,
|
||||
lapack_complex_double* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst );
|
||||
lapack_int ifst, lapack_int* ilst );
|
||||
|
||||
lapack_int LAPACKE_stgsen( int matrix_layout, lapack_int ijob,
|
||||
lapack_logical wantq, lapack_logical wantz,
|
||||
@@ -9933,14 +9933,14 @@ lapack_int LAPACKE_ctgexc_work( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_float* b, lapack_int ldb,
|
||||
lapack_complex_float* q, lapack_int ldq,
|
||||
lapack_complex_float* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst );
|
||||
lapack_int ifst, lapack_int* ilst );
|
||||
lapack_int LAPACKE_ztgexc_work( int matrix_layout, lapack_logical wantq,
|
||||
lapack_logical wantz, lapack_int n,
|
||||
lapack_complex_double* a, lapack_int lda,
|
||||
lapack_complex_double* b, lapack_int ldb,
|
||||
lapack_complex_double* q, lapack_int ldq,
|
||||
lapack_complex_double* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst );
|
||||
lapack_int ifst, lapack_int* ilst );
|
||||
|
||||
lapack_int LAPACKE_stgsen_work( int matrix_layout, lapack_int ijob,
|
||||
lapack_logical wantq, lapack_logical wantz,
|
||||
|
||||
@@ -4119,14 +4119,14 @@ int64_t LAPACKE_ctgexc_64( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_float* b, int64_t ldb,
|
||||
lapack_complex_float* q, int64_t ldq,
|
||||
lapack_complex_float* z, int64_t ldz,
|
||||
int64_t ifst, int64_t ilst );
|
||||
int64_t ifst, int64_t* ilst );
|
||||
int64_t LAPACKE_ztgexc_64( int matrix_layout, lapack_logical wantq,
|
||||
lapack_logical wantz, int64_t n,
|
||||
lapack_complex_double* a, int64_t lda,
|
||||
lapack_complex_double* b, int64_t ldb,
|
||||
lapack_complex_double* q, int64_t ldq,
|
||||
lapack_complex_double* z, int64_t ldz,
|
||||
int64_t ifst, int64_t ilst );
|
||||
int64_t ifst, int64_t* ilst );
|
||||
|
||||
int64_t LAPACKE_stgsen_64( int matrix_layout, int64_t ijob,
|
||||
lapack_logical wantq, lapack_logical wantz,
|
||||
@@ -9900,14 +9900,14 @@ int64_t LAPACKE_ctgexc_work_64( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_float* b, int64_t ldb,
|
||||
lapack_complex_float* q, int64_t ldq,
|
||||
lapack_complex_float* z, int64_t ldz,
|
||||
int64_t ifst, int64_t ilst );
|
||||
int64_t ifst, int64_t* ilst );
|
||||
int64_t LAPACKE_ztgexc_work_64( int matrix_layout, lapack_logical wantq,
|
||||
lapack_logical wantz, int64_t n,
|
||||
lapack_complex_double* a, int64_t lda,
|
||||
lapack_complex_double* b, int64_t ldb,
|
||||
lapack_complex_double* q, int64_t ldq,
|
||||
lapack_complex_double* z, int64_t ldz,
|
||||
int64_t ifst, int64_t ilst );
|
||||
int64_t ifst, int64_t* ilst );
|
||||
|
||||
int64_t LAPACKE_stgsen_work_64( int matrix_layout, int64_t ijob,
|
||||
lapack_logical wantq, lapack_logical wantz,
|
||||
|
||||
@@ -38,7 +38,7 @@ lapack_int API_SUFFIX(LAPACKE_ctgexc)( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_float* b, lapack_int ldb,
|
||||
lapack_complex_float* q, lapack_int ldq,
|
||||
lapack_complex_float* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst )
|
||||
lapack_int ifst, lapack_int* ilst )
|
||||
{
|
||||
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
|
||||
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ctgexc", -1 );
|
||||
|
||||
@@ -38,13 +38,13 @@ lapack_int API_SUFFIX(LAPACKE_ctgexc_work)( int matrix_layout, lapack_logical wa
|
||||
lapack_complex_float* b, lapack_int ldb,
|
||||
lapack_complex_float* q, lapack_int ldq,
|
||||
lapack_complex_float* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst )
|
||||
lapack_int ifst, lapack_int* ilst )
|
||||
{
|
||||
lapack_int info = 0;
|
||||
if( matrix_layout == LAPACK_COL_MAJOR ) {
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ctgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
|
||||
&ifst, &ilst, &info );
|
||||
&ifst, ilst, &info );
|
||||
if( info < 0 ) {
|
||||
info = info - 1;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ lapack_int API_SUFFIX(LAPACKE_ctgexc_work)( int matrix_layout, lapack_logical wa
|
||||
}
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ctgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
|
||||
&ldq_t, z_t, &ldz_t, &ifst, &ilst, &info );
|
||||
&ldq_t, z_t, &ldz_t, &ifst, ilst, &info );
|
||||
if( info < 0 ) {
|
||||
info = info - 1;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ lapack_int API_SUFFIX(LAPACKE_ztgexc)( int matrix_layout, lapack_logical wantq,
|
||||
lapack_complex_double* b, lapack_int ldb,
|
||||
lapack_complex_double* q, lapack_int ldq,
|
||||
lapack_complex_double* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst )
|
||||
lapack_int ifst, lapack_int* ilst )
|
||||
{
|
||||
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
|
||||
API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_ztgexc", -1 );
|
||||
|
||||
@@ -38,13 +38,13 @@ lapack_int API_SUFFIX(LAPACKE_ztgexc_work)( int matrix_layout, lapack_logical wa
|
||||
lapack_complex_double* b, lapack_int ldb,
|
||||
lapack_complex_double* q, lapack_int ldq,
|
||||
lapack_complex_double* z, lapack_int ldz,
|
||||
lapack_int ifst, lapack_int ilst )
|
||||
lapack_int ifst, lapack_int* ilst )
|
||||
{
|
||||
lapack_int info = 0;
|
||||
if( matrix_layout == LAPACK_COL_MAJOR ) {
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ztgexc( &wantq, &wantz, &n, a, &lda, b, &ldb, q, &ldq, z, &ldz,
|
||||
&ifst, &ilst, &info );
|
||||
&ifst, ilst, &info );
|
||||
if( info < 0 ) {
|
||||
info = info - 1;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ lapack_int API_SUFFIX(LAPACKE_ztgexc_work)( int matrix_layout, lapack_logical wa
|
||||
}
|
||||
/* Call LAPACK function and adjust info */
|
||||
LAPACK_ztgexc( &wantq, &wantz, &n, a_t, &lda_t, b_t, &ldb_t, q_t,
|
||||
&ldq_t, z_t, &ldz_t, &ifst, &ilst, &info );
|
||||
&ldq_t, z_t, &ldz_t, &ifst, ilst, &info );
|
||||
if( info < 0 ) {
|
||||
info = info - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user