Hi Tracey,
Thanks for the bug report. See commit 1667.
Here is the diff for reference.
- Code: Select all
- a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ if( LAPACKE_lsame( side, 'l' ) ) {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,m) );
+ } else {
+ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
+ }
Note, we could also have written:
a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,r) );
Where "r" is already initialized to be "m" or "n" depending on whether "side" is "L" or "R".
But I think your fix was clearer so I went with your fix on purpose.
Julien.