Skip to content

Commit 8440a4c

Browse files
authored
Merge pull request #1742 from martin-frbg/interim033
Add combination of old and new thread memory code selectable by new option USE_TLS
2 parents 52d3f7a + b55690a commit 8440a4c

File tree

4 files changed

+1614
-115
lines changed

4 files changed

+1614
-115
lines changed

Makefile.rule

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

cmake/system.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ if (CONSISTENT_FPCSR)
214214
set(CCOMMON_OPT "${CCOMMON_OPT} -DCONSISTENT_FPCSR")
215215
endif ()
216216

217+
if (USE_TLS)
218+
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_TLS")
219+
endif ()
220+
217221
# Only for development
218222
# set(CCOMMON_OPT "${CCOMMON_OPT} -DPARAMTEST")
219223
# set(CCOMMON_OPT "${CCOMMON_OPT} -DPREFETCHTEST")

0 commit comments

Comments
 (0)