Open RiccardoRossi opened 3 years ago
with Intel compiler it seems to work, I tested 1-20 threads
(used to compile: icpc threadlocal_test.cpp -fopenmp
)
Version: icpc (ICC) 19.0.5.281 20190815
@pooyan-dadvand can you also post the configuration that you tested this with?
I have tested it with MSVC 2017 x64: cl test_thread_local.cpp /openmp
and running several times with 8 threads works fine:
>test_thread_local.exe
n threads = 8
0
28
``
Description In principle there is no guarantee that thread_local is compatible with c++11, however the following code seems to work reliably with recent gcc and clang
can anyone try this with msvc or intel?