From 1d76ceab551e1918bb049f473fc9a57f90dee028 Mon Sep 17 00:00:00 2001 From: Deanna Hood Date: Tue, 17 Mar 2015 02:36:07 +1000 Subject: [PATCH] Remove floor, ceil, round for complex numbers --- Eigen/src/Core/MathFunctions.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index a2c9d16f9..fceb29e1a 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -784,14 +784,6 @@ T (round)(const T& x) return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5); } -template -EIGEN_DEVICE_FUNC -std::complex (round)(const std::complex& x) -{ - using numext::round; - return std::complex(round(real(x)), round(imag(x))); -} - template EIGEN_DEVICE_FUNC T (floor)(const T& x) @@ -800,16 +792,6 @@ T (floor)(const T& x) return floor(x); } -template -EIGEN_DEVICE_FUNC -std::complex (floor)(const std::complex& x) -{ - using std::real; - using std::imag; - using std::floor; - return std::complex(floor(real(x)), floor(imag(x))); -} - template EIGEN_DEVICE_FUNC T (ceil)(const T& x) @@ -818,16 +800,6 @@ T (ceil)(const T& x) return ceil(x); } -template -EIGEN_DEVICE_FUNC -std::complex (ceil)(const std::complex& x) -{ - using std::real; - using std::imag; - using std::ceil; - return std::complex(ceil(real(x)), ceil(imag(x))); -} - // Log base 2 for 32 bits positive integers. // Conveniently returns 0 for x==0. inline int log2(int x)