diff options
author | Gael Guennebaud <g.gael@free.fr> | 2010-06-22 16:08:35 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2010-06-22 16:08:35 +0200 |
commit | b4fe53f5610f20e9c4f15c676b3b26d252fd2fba (patch) | |
tree | 9a29de25cae2ee7c0fd177287d95ffc252b44a68 /Eigen/src/Core/products/TriangularMatrixMatrix.h | |
parent | fd9a9fa0aedea13866481309e8a5408d1d7c652b (diff) |
* makes all product use the new API to set the blocking sizes
* fix an issue preventing multithreading (now Dynamic = -1 ...)
Diffstat (limited to 'Eigen/src/Core/products/TriangularMatrixMatrix.h')
-rw-r--r-- | Eigen/src/Core/products/TriangularMatrixMatrix.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Eigen/src/Core/products/TriangularMatrixMatrix.h b/Eigen/src/Core/products/TriangularMatrixMatrix.h index a099160c2..decf515b0 100644 --- a/Eigen/src/Core/products/TriangularMatrixMatrix.h +++ b/Eigen/src/Core/products/TriangularMatrixMatrix.h @@ -114,8 +114,12 @@ struct ei_product_triangular_matrix_matrix<Scalar,Index,Mode,true, IsLower = (Mode&Lower) == Lower }; - Index kc = std::min<Index>(Blocking::Max_kc/4,depth); // cache block size along the K direction - Index mc = std::min<Index>(Blocking::Max_mc,rows); // cache block size along the M direction + Index kc = depth; // cache block size along the K direction + Index mc = rows; // cache block size along the M direction + Index nc = cols; // cache block size along the N direction + computeProductBlockingSizes<Scalar,Scalar>(kc, mc, nc); + // it is better to use smaller blocks along the diagonal + kc /= 4; Scalar* blockA = ei_aligned_stack_new(Scalar, kc*mc); std::size_t sizeB = kc*Blocking::PacketSize*Blocking::nr + kc*cols; @@ -238,8 +242,12 @@ struct ei_product_triangular_matrix_matrix<Scalar,Index,Mode,false, IsLower = (Mode&Lower) == Lower }; - Index kc = std::min<Index>(Blocking::Max_kc/4,depth); // cache block size along the K direction - Index mc = std::min<Index>(Blocking::Max_mc,rows); // cache block size along the M direction + Index kc = depth; // cache block size along the K direction + Index mc = rows; // cache block size along the M direction + Index nc = cols; // cache block size along the N direction + computeProductBlockingSizes<Scalar,Scalar>(kc, mc, nc); + // it is better to use smaller blocks along the diagonal + kc /= 4; Scalar* blockA = ei_aligned_stack_new(Scalar, kc*mc); std::size_t sizeB = kc*Blocking::PacketSize*Blocking::nr + kc*cols; @@ -273,7 +281,7 @@ struct ei_product_triangular_matrix_matrix<Scalar,Index,Mode,false, Index rs = IsLower ? std::min(cols,actual_k2) : cols - k2; // size of the triangular part Index ts = (IsLower && actual_k2>=cols) ? 0 : actual_kc; - + Scalar* geb = blockB+ts*ts; pack_rhs(geb, &rhs(actual_k2,IsLower ? 0 : k2), rhsStride, alpha, actual_kc, rs); |