Update tobf16.c
This commit is contained in:
parent
8e7e14b6aa
commit
242026cede
|
@ -135,7 +135,7 @@ void CNAME(BLASLONG n, FLOAT_TYPE * in, BLASLONG inc_in, bfloat16 * out, BLASLON
|
||||||
if (n <= 0) return;
|
if (n <= 0) return;
|
||||||
|
|
||||||
#if defined(SMP)
|
#if defined(SMP)
|
||||||
int nthreads = blas_cpu_number(1);
|
int nthreads;
|
||||||
FLOAT_TYPE dummy_alpha;
|
FLOAT_TYPE dummy_alpha;
|
||||||
FLOAT_TYPE dummy_c;
|
FLOAT_TYPE dummy_c;
|
||||||
#endif
|
#endif
|
||||||
|
@ -144,10 +144,11 @@ void CNAME(BLASLONG n, FLOAT_TYPE * in, BLASLONG inc_in, bfloat16 * out, BLASLON
|
||||||
if (inc_in == 0 || inc_out == 0 || n <= 100000) {
|
if (inc_in == 0 || inc_out == 0 || n <= 100000) {
|
||||||
nthreads = 1;
|
nthreads = 1;
|
||||||
} else {
|
} else {
|
||||||
|
nthreads = num_cpu_avail(1);
|
||||||
if (n/100000 < 100) {
|
if (n/100000 < 100) {
|
||||||
nthreads = MAX(nthreads,4);
|
nthreads = MAX(nthreads,4);
|
||||||
} else {
|
// } else {
|
||||||
nthreads = MAX(nthreads,16);
|
// nthreads = MAX(nthreads,16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue