POWER10: Fix multithreading check when USE_THREAD=0

This patch fixes an issue when OpenBLAS is compiled for TARGET=POWER10
and the flag USE_THREAD is set to 0.

The function `num_cpu_avail` is only available when USE_THREAD=1,
so SMP is defined.
This commit is contained in:
VFerrari 2022-06-25 03:21:18 -03:00
parent 9283c7c0b5
commit cac634fce3
No known key found for this signature in database
GPG Key ID: 34FDC20517C508FB
1 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,7 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph
#endif
#ifdef SMP
// Multi-threading execution outperforms (or approaches) the execution of the
// small kernel.
if (num_cpu_avail(3) > 1) {
@ -77,6 +78,9 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph
} else {
return 1;
}
#else
return 1;
#endif
#endif