diff options
author | 2016-04-29 13:41:26 -0700 | |
---|---|---|
committer | 2016-04-29 13:41:26 -0700 | |
commit | 07a247dcf4e86f9f741b68e1d8e0897de3eeca57 (patch) | |
tree | d103bd20faa1f103035bac2f21507ecc65f97f68 /unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h | |
parent | fa5a8f055aebbf4f39fca26e857351103fab4d11 (diff) | |
parent | 0f3c4c8ff4a6635db77195a8919c743f34181cc2 (diff) |
Pulled latest updates from upstream
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h index 6af2d45d4..cd04716bd 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h @@ -24,9 +24,17 @@ const T2& choose(Cond<false>, const T1&, const T2& second) { return second; } -template <typename T> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE + +template <typename T, typename X, typename Y> +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +T divup(const X x, const Y y) { + return static_cast<T>((x + y - 1) / y); +} + +template <typename T> +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T divup(const T x, const T y) { - return (x + y - 1) / y; + return static_cast<T>((x + y - 1) / y); } template <size_t n> struct max_n_1 { |