summaryrefslogtreecommitdiff
path: root/LAPACKE/src
diff options
context:
space:
mode:
authorlangou <langou@users.noreply.github.com>2015-12-10 02:52:46 +0000
committerlangou <langou@users.noreply.github.com>2015-12-10 02:52:46 +0000
commit9dbe6d0045c005dd125d2088b5b5e5a68c3b3585 (patch)
treee6fb6c5a5c831da8b1a224ffea40e9f829cab204 /LAPACKE/src
parentf20edd07ecec68cc10daa0be41ecd07594fba7c2 (diff)
downloadlapack-9dbe6d0045c005dd125d2088b5b5e5a68c3b3585.tar.gz
lapack-9dbe6d0045c005dd125d2088b5b5e5a68c3b3585.tar.bz2
lapack-9dbe6d0045c005dd125d2088b5b5e5a68c3b3585.zip
Bug reported by Tracey Brendan. Thanks Tracey.
See: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?t=4863
Diffstat (limited to 'LAPACKE/src')
-rw-r--r--LAPACKE/src/lapacke_cunmbr_work.c8
-rw-r--r--LAPACKE/src/lapacke_dormbr_work.c7
-rw-r--r--LAPACKE/src/lapacke_sormbr_work.c7
-rw-r--r--LAPACKE/src/lapacke_zunmbr_work.c8
4 files changed, 20 insertions, 10 deletions
diff --git a/LAPACKE/src/lapacke_cunmbr_work.c b/LAPACKE/src/lapacke_cunmbr_work.c
index c42f6e49..380f229f 100644
--- a/LAPACKE/src/lapacke_cunmbr_work.c
+++ b/LAPACKE/src/lapacke_cunmbr_work.c
@@ -73,9 +73,11 @@ lapack_int LAPACKE_cunmbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_float*)
- LAPACKE_malloc( sizeof(lapack_complex_float) *
- lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (lapack_complex_float*)LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
diff --git a/LAPACKE/src/lapacke_dormbr_work.c b/LAPACKE/src/lapacke_dormbr_work.c
index 3ac76fb0..dcd8842f 100644
--- a/LAPACKE/src/lapacke_dormbr_work.c
+++ b/LAPACKE/src/lapacke_dormbr_work.c
@@ -73,8 +73,11 @@ lapack_int LAPACKE_dormbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (double*)
- LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
diff --git a/LAPACKE/src/lapacke_sormbr_work.c b/LAPACKE/src/lapacke_sormbr_work.c
index f7a2ff3d..34bc41f3 100644
--- a/LAPACKE/src/lapacke_sormbr_work.c
+++ b/LAPACKE/src/lapacke_sormbr_work.c
@@ -73,8 +73,11 @@ lapack_int LAPACKE_sormbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (float*)
- LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;
diff --git a/LAPACKE/src/lapacke_zunmbr_work.c b/LAPACKE/src/lapacke_zunmbr_work.c
index 3558974b..ce5563ec 100644
--- a/LAPACKE/src/lapacke_zunmbr_work.c
+++ b/LAPACKE/src/lapacke_zunmbr_work.c
@@ -74,9 +74,11 @@ lapack_int LAPACKE_zunmbr_work( int matrix_layout, char vect, char side,
return (info < 0) ? (info - 1) : info;
}
/* Allocate memory for temporary array(s) */
- a_t = (lapack_complex_double*)
- LAPACKE_malloc( sizeof(lapack_complex_double) *
- lda_t * MAX(1,MIN(nq,k)) );
+ if( LAPACKE_lsame( vect, 'q' ) ) {
+ a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,k) );
+ } else {
+ a_t = (lapack_complex_double*)LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,nq) );
+ }
if( a_t == NULL ) {
info = LAPACK_TRANSPOSE_MEMORY_ERROR;
goto exit_level_0;