mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-07 03:39:04 +08:00
Added a 'divup' util to compute the floor of the quotient of two integers
This commit is contained in:
parent
715f6f049f
commit
515dee0baf
@ -24,6 +24,11 @@ const T2& choose(Cond<false>, const T1&, const T2& second) {
|
|||||||
return second;
|
return second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
|
T divup(const T x, const T y) {
|
||||||
|
return (x + y - 1) / y;
|
||||||
|
}
|
||||||
|
|
||||||
template <size_t n> struct max_n_1 {
|
template <size_t n> struct max_n_1 {
|
||||||
static const size_t size = n;
|
static const size_t size = n;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user