diff options
author | julie <julielangou@users.noreply.github.com> | 2015-09-03 06:07:59 +0000 |
---|---|---|
committer | julie <julielangou@users.noreply.github.com> | 2015-09-03 06:07:59 +0000 |
commit | a61ed54a7d33862fde26198b6935632953ea1d29 (patch) | |
tree | 729534684ba3d180c482a45c88b0563f2c7d6951 /LAPACKE/src/lapacke_cunmlq_work.c | |
parent | 2f2f760e62094d2ab4643cfbdc5625f1ce380ab0 (diff) |
Fixing bug 133
Bug reported by the GONUM team member: btracey on LAPACK forum
Link: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4771
Description: the number of columns of A depends on the Side, so the test should compare against m or n.
Fix by Julie.
Diffstat (limited to 'LAPACKE/src/lapacke_cunmlq_work.c')
-rw-r--r-- | LAPACKE/src/lapacke_cunmlq_work.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/LAPACKE/src/lapacke_cunmlq_work.c b/LAPACKE/src/lapacke_cunmlq_work.c index e8fcf23a..5cf66424 100644 --- a/LAPACKE/src/lapacke_cunmlq_work.c +++ b/LAPACKE/src/lapacke_cunmlq_work.c @@ -41,6 +41,7 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans, lapack_complex_float* work, lapack_int lwork ) { lapack_int info = 0; + lapack_int r; if( matrix_layout == LAPACK_COL_MAJOR ) { /* Call LAPACK function and adjust info */ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work, @@ -49,12 +50,13 @@ lapack_int LAPACKE_cunmlq_work( int matrix_layout, char side, char trans, info = info - 1; } } else if( matrix_layout == LAPACK_ROW_MAJOR ) { + r = LAPACKE_lsame( side, 'l' ) ? m : n; lapack_int lda_t = MAX(1,k); lapack_int ldc_t = MAX(1,m); lapack_complex_float* a_t = NULL; lapack_complex_float* c_t = NULL; /* Check leading dimension(s) */ - if( lda < m ) { + if( lda < r ) { info = -8; LAPACKE_xerbla( "LAPACKE_cunmlq_work", info ); return info; |