Make sure that block sizes are smaller than input matrix sizes.

This commit is contained in:
Gael Guennebaud 2016-01-26 23:30:24 +01:00
parent 639b1d864a
commit 5b0a9ee003

View File

@ -252,7 +252,7 @@ void evaluateProductBlockingSizesHeuristic(Index& k, Index& m, Index& n, Index n
// we have both L2 and L3, and problem is small enough to be kept in L2 // we have both L2 and L3, and problem is small enough to be kept in L2
// Let's choose m such that lhs's block fit in 1/3 of L2 // Let's choose m such that lhs's block fit in 1/3 of L2
actual_lm = l2; actual_lm = l2;
max_mc = 576; max_mc = (std::min<Index>)(576,max_mc);
} }
Index mc = (std::min<Index>)(actual_lm/(3*k*sizeof(LhsScalar)), max_mc); Index mc = (std::min<Index>)(actual_lm/(3*k*sizeof(LhsScalar)), max_mc);
if (mc > Traits::mr) mc -= mc % Traits::mr; if (mc > Traits::mr) mc -= mc % Traits::mr;