add status variable for openblas_set_num_threads

This commit is contained in:
Martin Kroeker 2023-03-08 23:41:57 +01:00 committed by GitHub
parent 9f9d0012a3
commit 05aa88268f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ static void adjust_thread_buffers() {
void goto_set_num_threads(int num_threads) {
blas_num_threads_set = 1;
if (num_threads < 0) blas_num_threads_set = 0;
if (num_threads < 1) num_threads = blas_num_threads;
if (num_threads > MAX_CPU_NUMBER) num_threads = MAX_CPU_NUMBER;