Fixed #6. Disable multi-thread swap when incx==0 or incy==0.
This commit is contained in:
parent
8dd3fd7f26
commit
78da0e0a0c
|
@ -79,6 +79,11 @@ void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
nthreads = num_cpu_avail(1);
|
nthreads = num_cpu_avail(1);
|
||||||
|
|
||||||
|
//disable multi-thread when incx==0 or incy==0
|
||||||
|
//In that case, the threads would be dependent.
|
||||||
|
if (incx == 0 || incy == 0)
|
||||||
|
nthreads = 1;
|
||||||
|
|
||||||
if (nthreads == 1) {
|
if (nthreads == 1) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,11 @@ void CNAME(blasint n, FLOAT *x, blasint incx, FLOAT *y, blasint incy){
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
nthreads = num_cpu_avail(1);
|
nthreads = num_cpu_avail(1);
|
||||||
|
|
||||||
|
//disable multi-thread when incx==0 or incy==0
|
||||||
|
//In that case, the threads would be dependent.
|
||||||
|
if (incx == 0 || incy == 0)
|
||||||
|
nthreads = 1;
|
||||||
|
|
||||||
if (nthreads == 1) {
|
if (nthreads == 1) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue