These are chat archives for symengine/symengine
The only holdout has been support for the thread-local keyword. This year, we added support. Let me tell you a little about it. If a variable is declared with a thread-local keyword, LLVM creates a separate variable per thread.
Initializers are called before the first use after thread entry, and destructors are called on thread exit.
C++ style thread-local storage, supports any C++ type.
And its syntax is portable with other C++ compilers.
The Apple LLVM Compiler, already has support for C-style thread-local storage, even when compiling C++ code.
There are two syntaxes available: One with a GCC style keyword, and another from the C11 standard.
C-style thread-local storage has lower overhead than C++ thread local, but it has restrictions.
It requires constant initializers and plain old data types.
If your code meets these restrictions, you should continue to use C-style thread-local storage for maximum performance.
Otherwise, use the C++ thread-local keyword.