Remove floor, ceil, round for complex numbers

This commit is contained in:
Deanna Hood 2015-03-17 02:36:07 +10:00
parent 717b7954ce
commit 1d76ceab55

View File

@ -784,14 +784,6 @@ T (round)(const T& x)
return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
}
template<typename T>
EIGEN_DEVICE_FUNC
std::complex<T> (round)(const std::complex<T>& x)
{
using numext::round;
return std::complex<T>(round(real(x)), round(imag(x)));
}
template<typename T>
EIGEN_DEVICE_FUNC
T (floor)(const T& x)
@ -800,16 +792,6 @@ T (floor)(const T& x)
return floor(x);
}
template<typename T>
EIGEN_DEVICE_FUNC
std::complex<T> (floor)(const std::complex<T>& x)
{
using std::real;
using std::imag;
using std::floor;
return std::complex<T>(floor(real(x)), floor(imag(x)));
}
template<typename T>
EIGEN_DEVICE_FUNC
T (ceil)(const T& x)
@ -818,16 +800,6 @@ T (ceil)(const T& x)
return ceil(x);
}
template<typename T>
EIGEN_DEVICE_FUNC
std::complex<T> (ceil)(const std::complex<T>& x)
{
using std::real;
using std::imag;
using std::ceil;
return std::complex<T>(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)