Skip to content

Commit 2caa221

Browse files
authored
Add USE_TLS option to choose between old and new implementation of memory.c
1 parent 2a589c4 commit 2caa221

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Makefile.rule

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
# This library's version
6-
VERSION = 0.3.1.dev
6+
VERSION = 0.3.3.dev
77

88
# If you set the suffix, the library name will be libopenblas_$(LIBNAMESUFFIX).a
99
# and libopenblas_$(LIBNAMESUFFIX).so. Meanwhile, the soname in shared library
@@ -107,7 +107,13 @@ BUILD_LAPACK_DEPRECATED = 1
107107
# BUILD_RELAPACK = 1
108108

109109
# If you want to use legacy threaded Level 3 implementation.
110-
# USE_SIMPLE_THREADED_LEVEL3 = 1
110+
USE_SIMPLE_THREADED_LEVEL3 = 1
111+
112+
# If you want to use the new, still somewhat experimental code that uses
113+
# thread-local storage instead of a central memory buffer in memory.c
114+
# Note that if your system uses GLIBC, it needs to have at least glibc 2.21
115+
# for this to work.
116+
USE_TLS = 1
111117

112118
# If you want to drive whole 64bit region by BLAS. Not all Fortran
113119
# compiler supports this. It's safe to keep comment it out if you

Makefile.system

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,10 @@ ifdef USE_SIMPLE_THREADED_LEVEL3
10181018
CCOMMON_OPT += -DUSE_SIMPLE_THREADED_LEVEL3
10191019
endif
10201020

1021+
ifdef USE_TLS
1022+
CCOMMON_OPT += -DUSE_TLS
1023+
endif
1024+
10211025
ifndef SYMBOLPREFIX
10221026
SYMBOLPREFIX =
10231027
endif

0 commit comments

Comments
 (0)