aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/GlobalFunctions.h
diff options
context:
space:
mode:
authorGravatar Ilya Tokar <tokarip@google.com>2019-12-16 16:00:35 -0500
committerGravatar Ilya Tokar <tokarip@google.com>2020-01-07 21:22:44 +0000
commit19876ced76bd1730008e02fc4c43c2228faed38a (patch)
tree22f999134e79f84f6f9dc0d19bdfa6740db416f0 /Eigen/src/Core/GlobalFunctions.h
parentd0ae052da4ce25a5b4306bfbb5bf8edcd010b663 (diff)
Bug #1785: Introduce numext::rint.
This provides a new op that matches std::rint and previous behavior of pround. Also adds corresponding unsupported/../Tensor op. Performance is the same as e. g. floor (tested SSE/AVX).
Diffstat (limited to 'Eigen/src/Core/GlobalFunctions.h')
-rw-r--r--Eigen/src/Core/GlobalFunctions.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Eigen/src/Core/GlobalFunctions.h b/Eigen/src/Core/GlobalFunctions.h
index 7f132bdd0..8d54f92df 100644
--- a/Eigen/src/Core/GlobalFunctions.h
+++ b/Eigen/src/Core/GlobalFunctions.h
@@ -89,6 +89,7 @@ namespace Eigen
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(rsqrt,scalar_rsqrt_op,reciprocal square root,\sa ArrayBase::rsqrt)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(square,scalar_square_op,square (power 2),\sa Eigen::abs2 DOXCOMMA Eigen::pow DOXCOMMA ArrayBase::square)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(cube,scalar_cube_op,cube (power 3),\sa Eigen::pow DOXCOMMA ArrayBase::cube)
+ EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(rint,scalar_rint_op,nearest integer,\sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(round,scalar_round_op,nearest integer,\sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(floor,scalar_floor_op,nearest integer not greater than the giben value,\sa Eigen::ceil DOXCOMMA ArrayBase::floor)
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(ceil,scalar_ceil_op,nearest integer not less than the giben value,\sa Eigen::floor DOXCOMMA ArrayBase::ceil)