diff options
author | 2015-02-18 15:51:00 +0100 | |
---|---|---|
committer | 2015-02-18 15:51:00 +0100 | |
commit | 73a24de42427325d139519edf85fbe05aabf41f5 (patch) | |
tree | fabb30b008c1e39be235aa53f0fdf3123e1f8948 /Eigen | |
parent | 63eb0f6fe6c7223c3bb2a2ea9495fddcc1e4b6f2 (diff) | |
parent | 4a3e6c8be1d4752b3172a7e26631c4669e28dde7 (diff) |
merge
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/products/GeneralBlockPanelKernel.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Eigen/src/Core/products/GeneralBlockPanelKernel.h b/Eigen/src/Core/products/GeneralBlockPanelKernel.h index dc679b3fe..12948a20c 100644 --- a/Eigen/src/Core/products/GeneralBlockPanelKernel.h +++ b/Eigen/src/Core/products/GeneralBlockPanelKernel.h @@ -83,6 +83,22 @@ inline void manage_caching_sizes(Action action, std::ptrdiff_t* l1, std::ptrdiff template<typename LhsScalar, typename RhsScalar, int KcFactor> void computeProductBlockingSizes(Index& k, Index& m, Index& n, Index num_threads = 1) { +#ifdef EIGEN_TEST_SPECIFIC_BLOCKING_SIZES + EIGEN_UNUSED_VARIABLE(num_threads); + typedef gebp_traits<LhsScalar,RhsScalar> Traits; + enum { + kr = 16, + mr = Traits::mr, + nr = Traits::nr + }; + k = std::min<SizeType>(k, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_K); + if (k > kr) k -= k % kr; + m = std::min<SizeType>(n, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_M); + if (m > mr) m -= m % mr; + n = std::min<SizeType>(k, EIGEN_TEST_SPECIFIC_BLOCKING_SIZE_N); + if (n > nr) n -= n % nr; + return; +#endif // Explanations: // Let's recall that the product algorithms form mc x kc vertical panels A' on the lhs and // kc x nc blocks B' on the rhs. B' has to fit into L2/L3 cache. Moreover, A' is processed |