Skip to content

Commit 14df73a

Browse files
authored
Merge pull request #1135 from langou/try___fix_cunmlq_zunmlq_in_LAPACKE
2 parents 18587a4 + 709a34b commit 14df73a

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

LAPACKE/src/lapacke_cunmlq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ lapack_int API_SUFFIX(LAPACKE_cunmlq)( int matrix_layout, char side, char trans,
4949
#ifndef LAPACK_DISABLE_NAN_CHECK
5050
if( LAPACKE_get_nancheck() ) {
5151
/* Optionally check input matrices for NaNs */
52-
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, k, m, a, lda ) ) {
52+
lapack_int r = API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ? m : n;
53+
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, k, r, a, lda ) ) {
5354
return -7;
5455
}
5556
if( API_SUFFIX(LAPACKE_cge_nancheck)( matrix_layout, m, n, c, ldc ) ) {

LAPACKE/src/lapacke_cunmlq_work.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ lapack_int API_SUFFIX(LAPACKE_cunmlq_work)( int matrix_layout, char side, char t
9090
goto exit_level_1;
9191
}
9292
/* Transpose input matrices */
93-
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, k, m, a, lda, a_t, lda_t );
93+
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, k, r, a, lda, a_t, lda_t );
9494
API_SUFFIX(LAPACKE_cge_trans)( matrix_layout, m, n, c, ldc, c_t, ldc_t );
9595
/* Call LAPACK function and adjust info */
9696
LAPACK_cunmlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,

LAPACKE/src/lapacke_zunmlq.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ lapack_int API_SUFFIX(LAPACKE_zunmlq)( int matrix_layout, char side, char trans,
4949
#ifndef LAPACK_DISABLE_NAN_CHECK
5050
if( LAPACKE_get_nancheck() ) {
5151
/* Optionally check input matrices for NaNs */
52-
if( API_SUFFIX(LAPACKE_zge_nancheck)( matrix_layout, k, m, a, lda ) ) {
52+
lapack_int r = API_SUFFIX(LAPACKE_lsame)( side, 'l' ) ? m : n;
53+
if( API_SUFFIX(LAPACKE_zge_nancheck)( matrix_layout, k, r, a, lda ) ) {
5354
return -7;
5455
}
5556
if( API_SUFFIX(LAPACKE_zge_nancheck)( matrix_layout, m, n, c, ldc ) ) {

LAPACKE/src/lapacke_zunmlq_work.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ lapack_int API_SUFFIX(LAPACKE_zunmlq_work)( int matrix_layout, char side, char t
9090
goto exit_level_1;
9191
}
9292
/* Transpose input matrices */
93-
API_SUFFIX(LAPACKE_zge_trans)( matrix_layout, k, m, a, lda, a_t, lda_t );
93+
API_SUFFIX(LAPACKE_zge_trans)( matrix_layout, k, r, a, lda, a_t, lda_t );
9494
API_SUFFIX(LAPACKE_zge_trans)( matrix_layout, m, n, c, ldc, c_t, ldc_t );
9595
/* Call LAPACK function and adjust info */
9696
LAPACK_zunmlq( &side, &trans, &m, &n, &k, a_t, &lda_t, tau, c_t, &ldc_t,

0 commit comments

Comments
 (0)