mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-18 19:30:38 +08:00
Remove floor, ceil, round for complex numbers
This commit is contained in:
parent
717b7954ce
commit
1d76ceab55
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user