File tree 6 files changed +22
-5
lines changed
6 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -314,6 +314,23 @@ typedef int blasint;
314
314
#define YIELDING sched_yield()
315
315
#endif
316
316
317
+ /***
318
+ To alloc job_t on heap or statck.
319
+ please https://github.com/xianyi/OpenBLAS/issues/246
320
+ ***/
321
+ #if defined(OS_WINDOWS )
322
+ #define GETRF_MEM_ALLOC_THRESHOLD 32
323
+ #define BLAS3_MEM_ALLOC_THRESHOLD 32
324
+ #endif
325
+
326
+ #ifndef GETRF_MEM_ALLOC_THRESHOLD
327
+ #define GETRF_MEM_ALLOC_THRESHOLD 80
328
+ #endif
329
+
330
+ #ifndef BLAS3_MEM_ALLOC_THRESHOLD
331
+ #define BLAS3_MEM_ALLOC_THRESHOLD 160
332
+ #endif
333
+
317
334
#ifdef QUAD_PRECISION
318
335
#include "common_quad.h"
319
336
#endif
Original file line number Diff line number Diff line change 50
50
51
51
//The array of job_t may overflow the stack.
52
52
//Instead, use malloc to alloc job_t.
53
- #if MAX_CPU_NUMBER > 210
53
+ #if MAX_CPU_NUMBER > BLAS3_MEM_ALLOC_THRESHOLD
54
54
#define USE_ALLOC_HEAP
55
55
#endif
56
56
Original file line number Diff line number Diff line change 50
50
51
51
//The array of job_t may overflow the stack.
52
52
//Instead, use malloc to alloc job_t.
53
- #if MAX_CPU_NUMBER > 210
53
+ #if MAX_CPU_NUMBER > BLAS3_MEM_ALLOC_THRESHOLD
54
54
#define USE_ALLOC_HEAP
55
55
#endif
56
56
Original file line number Diff line number Diff line change 50
50
51
51
//The array of job_t may overflow the stack.
52
52
//Instead, use malloc to alloc job_t.
53
- #if MAX_CPU_NUMBER > 210
53
+ #if MAX_CPU_NUMBER > BLAS3_MEM_ALLOC_THRESHOLD
54
54
#define USE_ALLOC_HEAP
55
55
#endif
56
56
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ double sqrt(double);
45
45
46
46
//In this case, the recursive getrf_parallel may overflow the stack.
47
47
//Instead, use malloc to alloc job_t.
48
- #if MAX_CPU_NUMBER > 90
48
+ #if MAX_CPU_NUMBER > GETRF_MEM_ALLOC_THRESHOLD
49
49
#define USE_ALLOC_HEAP
50
50
#endif
51
51
Original file line number Diff line number Diff line change 43
43
44
44
//The array of job_t may overflow the stack.
45
45
//Instead, use malloc to alloc job_t.
46
- #if MAX_CPU_NUMBER > 210
46
+ #if MAX_CPU_NUMBER > BLAS3_MEM_ALLOC_THRESHOLD
47
47
#define USE_ALLOC_HEAP
48
48
#endif
49
49
You can’t perform that action at this time.
0 commit comments