From aeed8d6225501a3ec0eaf82bdbd614ee5d4e336b Mon Sep 17 00:00:00 2001 From: Xianyi Zhang Date: Sun, 19 Jun 2011 11:55:29 +0800 Subject: [PATCH] Fixed #27. Temporarily walk around axpy's low performance issue with small imput size & multithreads. --- Changelog.txt | 1 + interface/axpy.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 9089096e5..2c1bfdf53 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -25,6 +25,7 @@ x86/x86_64: * Fixed #28 a wrong result of dsdot on x86_64. * Fixed #32 a SEGFAULT bug of zdotc with gcc-4.6. * Fixed #33 ztrmm bug on Nehalem. + * Walk round #27 the low performance axpy issue with small imput size & multithreads. MIPS64: * Fixed #28 a wrong result of dsdot on Loongson3A/MIPS64. diff --git a/interface/axpy.c b/interface/axpy.c index dd75b758c..82b0ee234 100644 --- a/interface/axpy.c +++ b/interface/axpy.c @@ -85,7 +85,11 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc //In that case, the threads would be dependent. if (incx == 0 || incy == 0) nthreads = 1; - + + //Temporarily walk around the low performance issue with small imput size & multithreads. + if (n <= 10000) + nthreads = 1; + if (nthreads == 1) { #endif