]> git.pld-linux.org Git - packages/eigen3.git/blame - error-counting.patch
- add fix for https://gitlab.com/libeigen/eigen/-/issues/2011
[packages/eigen3.git] / error-counting.patch
CommitLineData
bc87d2c0
JR
1diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h
2index 67b2442b53a114af3c08829af4344acc6be7a42f..a3cc05b77bbd19466e7f969d37ec18085ba3d36c 100644
3--- a/Eigen/src/Core/products/Parallelizer.h
4+++ b/Eigen/src/Core/products/Parallelizer.h
5@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
6
7 ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0);
8
9- int errorCount = 0;
10- #pragma omp parallel num_threads(threads) reduction(+: errorCount)
11+ #pragma omp parallel num_threads(threads)
12 {
13 Index i = omp_get_thread_num();
14 // Note that the actual number of threads might be lower than the number of request ones.
15@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth,
16 info[i].lhs_start = r0;
17 info[i].lhs_length = actualBlockRows;
18
19- EIGEN_TRY {
20- if(transpose) func(c0, actualBlockCols, 0, rows, info);
21- else func(0, rows, c0, actualBlockCols, info);
22- } EIGEN_CATCH(...) {
23- ++errorCount;
24- }
25+ if(transpose)
26+ func(c0, actualBlockCols, 0, rows, info);
27+ else
28+ func(0, rows, c0, actualBlockCols, info);
29 }
30- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
31 #endif
32 }
33
34diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
35index 0747aa6cb65a40a47fdee2685a2798f93c481ea0..b0257778082143ce27fc847cf163e845fa2afd1e 100644
36--- a/test/CMakeLists.txt
37+++ b/test/CMakeLists.txt
38@@ -163,7 +163,7 @@ ei_add_test(constructor)
39 ei_add_test(linearstructure)
40 ei_add_test(integer_types)
41 ei_add_test(unalignedcount)
42-if(NOT EIGEN_TEST_NO_EXCEPTIONS)
43+if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP)
44 ei_add_test(exceptions)
45 endif()
46 ei_add_test(redux)
This page took 0.118286 seconds and 4 git commands to generate.