diff options
Diffstat (limited to 'math/eigen3/files')
-rw-r--r-- | math/eigen3/files/patch-Eigen_src_Core_products_Parallelizer.h | 31 | ||||
-rw-r--r-- | math/eigen3/files/patch-test_CMakeLists.txt | 11 |
2 files changed, 42 insertions, 0 deletions
diff --git a/math/eigen3/files/patch-Eigen_src_Core_products_Parallelizer.h b/math/eigen3/files/patch-Eigen_src_Core_products_Parallelizer.h new file mode 100644 index 000000000000..660759aff0a9 --- /dev/null +++ b/math/eigen3/files/patch-Eigen_src_Core_products_Parallelizer.h @@ -0,0 +1,31 @@ +--- Eigen/src/Core/products/Parallelizer.h.orig 2020-10-05 11:24:15 UTC ++++ Eigen/src/Core/products/Parallelizer.h +@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, + + ei_declare_aligned_stack_constructed_variable(GemmParallelInfo<Index>,info,threads,0); + +- int errorCount = 0; +- #pragma omp parallel num_threads(threads) reduction(+: errorCount) ++ #pragma omp parallel num_threads(threads) + { + Index i = omp_get_thread_num(); + // Note that the actual number of threads might be lower than the number of request ones. +@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, + info[i].lhs_start = r0; + info[i].lhs_length = actualBlockRows; + +- EIGEN_TRY { +- if(transpose) func(c0, actualBlockCols, 0, rows, info); +- else func(0, rows, c0, actualBlockCols, info); +- } EIGEN_CATCH(...) { +- ++errorCount; +- } ++ if(transpose) ++ func(c0, actualBlockCols, 0, rows, info); ++ else ++ func(0, rows, c0, actualBlockCols, info); + } +- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); + #endif + } + diff --git a/math/eigen3/files/patch-test_CMakeLists.txt b/math/eigen3/files/patch-test_CMakeLists.txt new file mode 100644 index 000000000000..826374bc38f5 --- /dev/null +++ b/math/eigen3/files/patch-test_CMakeLists.txt @@ -0,0 +1,11 @@ +--- test/CMakeLists.txt.orig 2020-10-05 11:24:15 UTC ++++ test/CMakeLists.txt +@@ -163,7 +163,7 @@ ei_add_test(constructor) + ei_add_test(linearstructure) + ei_add_test(integer_types) + ei_add_test(unalignedcount) +-if(NOT EIGEN_TEST_NO_EXCEPTIONS) ++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) + ei_add_test(exceptions) + endif() + ei_add_test(redux) |