Clean a bit computeProductBlockingSizes (use Index type, remove CEIL macro)

This commit is contained in:
Gael Guennebaud
2015-02-18 15:49:05 +01:00
parent fc5c3e85e2
commit 63eb0f6fe6
2 changed files with 34 additions and 29 deletions

View File

@@ -284,6 +284,14 @@ template<typename T> EIGEN_DEVICE_FUNC void swap(T &a, T &b) { T tmp = b; b =
template<typename T> EIGEN_STRONG_INLINE void swap(T &a, T &b) { std::swap(a,b); }
#endif
// Integer division with rounding up.
// T is assumed to be an integer type with a>=0, and b>0
template<typename T>
T div_ceil(const T &a, const T &b)
{
return (a+b-1) / b;
}
} // end namespace numext
} // end namespace Eigen