Browse Source

Allocate IWORK to hold at least the one element for workspace queries

pull/5369/head
Martin Kroeker GitHub 2 months ago
parent
commit
b746f0eda3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions
  1. +6
    -0
      lapack-netlib/LAPACKE/src/lapacke_dtrsen.c
  2. +7
    -0
      lapack-netlib/LAPACKE/src/lapacke_strsen.c

+ 6
- 0
lapack-netlib/LAPACKE/src/lapacke_dtrsen.c View File

@@ -78,6 +78,12 @@ lapack_int LAPACKE_dtrsen( int matrix_layout, char job, char compq,
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
} else {
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
}
work = (double*)LAPACKE_malloc( sizeof(double) * lwork );
if( work == NULL ) {


+ 7
- 0
lapack-netlib/LAPACKE/src/lapacke_strsen.c View File

@@ -77,7 +77,14 @@ lapack_int LAPACKE_strsen( int matrix_layout, char job, char compq,
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
} else {
iwork = (lapack_int*)LAPACKE_malloc( sizeof(lapack_int) );
if( iwork == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;
goto exit_level_0;
}
}

work = (float*)LAPACKE_malloc( sizeof(float) * lwork );
if( work == NULL ) {
info = LAPACK_WORK_MEMORY_ERROR;


Loading…
Cancel
Save