]> xenbits.xensource.com Git - unikraft/libs/eigen.git/commitdiff
Prevent kludgeoning by barrier macro. RELEASE-0.5
authorFelipe Huici <felipe.huici@neclab.eu>
Fri, 17 Apr 2020 20:21:40 +0000 (22:21 +0200)
committerFelipe Huici <felipe.huici@neclab.eu>
Tue, 7 Jul 2020 19:18:41 +0000 (21:18 +0200)
Add patch to prevent the definition of the macro "barrier" in lcpu.h
from kludgeoning the use of the word barrier in eigen code.

Signed-off-by: Felipe Huici <felipe.huici@neclab.eu
Reviewed-by: George Muraru <murarugeorgec@gmail.com>
patches/0002-prevent-barrier-macro-code-kludge.patch [new file with mode: 0644]

diff --git a/patches/0002-prevent-barrier-macro-code-kludge.patch b/patches/0002-prevent-barrier-macro-code-kludge.patch
new file mode 100644 (file)
index 0000000..0b3fe78
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h      2020-04-17 17:13:19.072796790 +0200
++++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceThreadPool.h      2021-04-17 17:13:41.800543414 +0200
+@@ -98,6 +98,7 @@
+       const char* src_ptr = static_cast<const char*>(src);
+       char* dst_ptr = static_cast<char*>(dst);
+       const size_t blocksize = (n + (num_threads - 1)) / num_threads;
++#undef barrier      
+       Barrier barrier(static_cast<int>(num_threads - 1));
+       // Launch the last 3 blocks on worker threads.
+       for (size_t i = 1; i < num_threads; ++i) {