parent
fb28e4adc9
commit
4beffaaa4b
|
@ -41,6 +41,7 @@ lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
|
||||||
{
|
{
|
||||||
lapack_int ncols_a, nrows_a;
|
lapack_int ncols_a, nrows_a;
|
||||||
lapack_int nrows_v;
|
lapack_int nrows_v;
|
||||||
|
lapack_int lwork;
|
||||||
lapack_int info = 0;
|
lapack_int info = 0;
|
||||||
float* work = NULL;
|
float* work = NULL;
|
||||||
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
|
if( matrix_layout != LAPACK_COL_MAJOR && matrix_layout != LAPACK_ROW_MAJOR ) {
|
||||||
|
@ -69,7 +70,9 @@ lapack_int LAPACKE_stpmqrt( int matrix_layout, char side, char trans,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Allocate memory for working array(s) */
|
/* Allocate memory for working array(s) */
|
||||||
work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) * MAX(1,nb) );
|
lwork = LAPACKE_lsame( side, 'L' ) ? MAX(1,nb) * MAX(1,n) :
|
||||||
|
( LAPACKE_lsame( side, 'R' ) ? MAX(1,m) * MAX(1,nb) : 0 );
|
||||||
|
work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
|
||||||
if( work == NULL ) {
|
if( work == NULL ) {
|
||||||
info = LAPACK_WORK_MEMORY_ERROR;
|
info = LAPACK_WORK_MEMORY_ERROR;
|
||||||
goto exit_level_0;
|
goto exit_level_0;
|
||||||
|
|
Loading…
Reference in New Issue