Let make MAX_STACK_ALLOC=0 do what expected
authorJerome Robert <jeromerobert@gmx.com>
Thu, 31 Dec 2015 13:32:53 +0000 (13:32 +0000)
committerJerome Robert <jeromerobert@gmx.com>
Thu, 31 Dec 2015 13:43:09 +0000 (14:43 +0100)
It's no longer required to modify Makefile.rule to disable
stack allocation. It's now possible to run:

make MAX_STACK_ALLOC=0

Makefile.rule
Makefile.system

index 0d7c45e..4a6e4e9 100644 (file)
@@ -163,10 +163,11 @@ COMMON_PROF = -pg
 # Build Debug version
 # DEBUG = 1
 
-# Improve GEMV and GER for small matrices by stack allocation.
-# For details, https://github.com/xianyi/OpenBLAS/pull/482
+# Set maximum stack allocation.
+# The default value is 2048. 0 disable stack allocation a may reduce GER and GEMV
+# performance. For details, https://github.com/xianyi/OpenBLAS/pull/482
 #
- MAX_STACK_ALLOC=2048
+# MAX_STACK_ALLOC = 0
 
 # Add a prefix or suffix to all exported symbol names in the shared library.
 # Avoid conflicts with other BLAS libraries, especially when using
index 9de9232..b3e83e2 100644 (file)
@@ -328,7 +328,8 @@ ifdef SANITY_CHECK
 CCOMMON_OPT    += -DSANITY_CHECK -DREFNAME=$(*F)f$(BU)
 endif
 
-ifdef MAX_STACK_ALLOC
+MAX_STACK_ALLOC ?= 2048
+ifneq ($(MAX_STACK_ALLOC), 0)
 CCOMMON_OPT    += -DMAX_STACK_ALLOC=$(MAX_STACK_ALLOC)
 endif