Skip to content

Commit 45d7f4a

Browse files
committed
Use affinity_partitioner
1 parent 7bdd2bb commit 45d7f4a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

patch_size.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h
2-
index 6b85d1d5a..81aa7fbf5 100644
2+
index 6b85d1d5a..f7d023c7a 100644
33
--- a/Eigen/src/SVD/BDCSVD.h
44
+++ b/Eigen/src/SVD/BDCSVD.h
55
@@ -30,6 +30,10 @@
@@ -8,7 +8,7 @@ index 6b85d1d5a..81aa7fbf5 100644
88

99
+#include <tbb/parallel_reduce.h>
1010
+
11-
+tbb::affinity_partitioner ap;
11+
+static tbb::affinity_partitioner ap;
1212
+
1313
#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE
1414
#include <iostream>

src/Gauss.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ inline mpreal MP_PI_HALF{MP_PI / 2};
2828

2929
extern Config config;
3030

31-
extern tbb::affinity_partitioner ap;
32-
3331
class Evaluation {
3432
const mpreal ONE = mpreal(1, config.precision_bits);
3533
const mpreal TWO = mpreal(2, config.precision_bits);
@@ -68,6 +66,8 @@ class Evaluation {
6866
};
6967

7068
class LegendrePolynomial {
69+
static tbb::affinity_partitioner ap;
70+
7171
const mpreal ONE = mpreal(1, config.precision_bits);
7272
const mpreal TWO = mpreal(2, config.precision_bits);
7373

@@ -105,6 +105,8 @@ class LegendrePolynomial {
105105
[[nodiscard]] mpreal weight(const int i) const { return this->_w[i]; }
106106
};
107107

108+
tbb::affinity_partitioner LegendrePolynomial::ap{};
109+
108110
class Quadrature {
109111
LegendrePolynomial poly;
110112

0 commit comments

Comments
 (0)