Browse Source

re-arrange new code for readability

tags/v0.3.4
Andrew 7 years ago
parent
commit
a293bdcd5e
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      interface/zhemv.c

+ 5
- 2
interface/zhemv.c View File

@@ -43,6 +43,10 @@
#include "functable.h" #include "functable.h"
#endif #endif


// this is smallest dimension N of square input a to permit threading
// see graph in issue #1820 for explanation
#define MULTI_THREAD_MINIMAL 362

#ifdef XDOUBLE #ifdef XDOUBLE
#define ERROR_NAME "XHEMV " #define ERROR_NAME "XHEMV "
#elif defined(DOUBLE) #elif defined(DOUBLE)
@@ -195,8 +199,7 @@ void CNAME(enum CBLAS_ORDER order, enum CBLAS_UPLO Uplo, blasint n, void *VALPHA
buffer = (FLOAT *)blas_memory_alloc(1); buffer = (FLOAT *)blas_memory_alloc(1);


#ifdef SMP #ifdef SMP
// see graph in issue #1820 for explanation and room for improvement
if (n<362) {
if (n<MULTI_THREAD_MINIMAL) {
nthreads = 1 ; nthreads = 1 ;
} else { } else {
nthreads = num_cpu_avail(2); nthreads = num_cpu_avail(2);


Loading…
Cancel
Save