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:
parent
9283c7c0b5
commit
cac634fce3
|
@ -69,6 +69,7 @@ int CNAME(int transa, int transb, BLASLONG M, BLASLONG N, BLASLONG K, FLOAT alph
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SMP
|
||||||
// Multi-threading execution outperforms (or approaches) the execution of the
|
// Multi-threading execution outperforms (or approaches) the execution of the
|
||||||
// small kernel.
|
// small kernel.
|
||||||
if (num_cpu_avail(3) > 1) {
|
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 {
|
} else {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue