mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Rename isinf to isInf
This commit is contained in:
parent
46cf9cda32
commit
fef4e071d7
@ -215,7 +215,7 @@ EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(round, Round)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(floor, Floor)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(ceil, Ceil)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isNaN, IsNaN)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isinf, Isinf)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isInf, IsInf)
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_LA(isFinite, IsFinite)
|
||||
|
||||
EIGEN_MKL_VML_DECLARE_UNARY_CALLS_REAL(square, Sqr)
|
||||
|
@ -78,7 +78,7 @@ struct default_packet_traits
|
||||
HasFloor = 0,
|
||||
HasCeil = 0,
|
||||
HasIsNaN = 0,
|
||||
HasIsinf = 0,
|
||||
HasIsInf = 0,
|
||||
HasIsFinite = 0
|
||||
};
|
||||
};
|
||||
@ -400,9 +400,9 @@ Packet pceil(const Packet& a) { using numext::ceil; return ceil(a); }
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
Packet pisNaN(const Packet& a) { using numext::isNaN; return isNaN(a); }
|
||||
|
||||
/** \internal \returns the isinf of \a a (coeff-wise) */
|
||||
/** \internal \returns the isInf of \a a (coeff-wise) */
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
Packet pisinf(const Packet& a) { using numext::isinf; return isinf(a); }
|
||||
Packet pisInf(const Packet& a) { using numext::isInf; return isInf(a); }
|
||||
|
||||
/** \internal \returns the isFinite of \a a (coeff-wise) */
|
||||
template<typename Packet> EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
|
||||
|
@ -60,7 +60,7 @@ namespace Eigen
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(floor,scalar_floor_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(ceil,scalar_ceil_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isNaN,scalar_isNaN_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isinf,scalar_isinf_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isInf,scalar_isInf_op)
|
||||
EIGEN_ARRAY_DECLARE_GLOBAL_UNARY(isFinite,scalar_isFinite_op)
|
||||
|
||||
template<typename Derived>
|
||||
|
@ -759,7 +759,7 @@ bool (isNaN)(const std::complex<T>& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool (isinf)(const T& x)
|
||||
bool (isInf)(const T& x)
|
||||
{
|
||||
using std::isinf;
|
||||
return isinf(x);
|
||||
@ -767,7 +767,7 @@ bool (isinf)(const T& x)
|
||||
|
||||
template<typename T>
|
||||
EIGEN_DEVICE_FUNC
|
||||
bool (isinf)(const std::complex<T>& x)
|
||||
bool (isInf)(const std::complex<T>& x)
|
||||
{
|
||||
using std::real;
|
||||
using std::imag;
|
||||
|
@ -587,22 +587,22 @@ struct functor_traits<scalar_isNaN_op<Scalar> >
|
||||
};
|
||||
|
||||
/** \internal
|
||||
* \brief Template functor to compute the isinf of a scalar
|
||||
* \sa class CwiseUnaryOp, ArrayBase::isinf()
|
||||
* \brief Template functor to compute the isInf of a scalar
|
||||
* \sa class CwiseUnaryOp, ArrayBase::isInf()
|
||||
*/
|
||||
template<typename Scalar> struct scalar_isinf_op {
|
||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_isinf_op)
|
||||
template<typename Scalar> struct scalar_isInf_op {
|
||||
EIGEN_EMPTY_STRUCT_CTOR(scalar_isInf_op)
|
||||
typedef bool result_type;
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::isinf(a); }
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::isInf(a); }
|
||||
typedef typename packet_traits<Scalar>::type Packet;
|
||||
inline Packet packetOp(const Packet& a) const { return internal::pisinf(a); }
|
||||
inline Packet packetOp(const Packet& a) const { return internal::pisInf(a); }
|
||||
};
|
||||
template<typename Scalar>
|
||||
struct functor_traits<scalar_isinf_op<Scalar> >
|
||||
struct functor_traits<scalar_isInf_op<Scalar> >
|
||||
{
|
||||
enum {
|
||||
Cost = NumTraits<Scalar>::MulCost,
|
||||
PacketAccess = packet_traits<Scalar>::HasIsinf
|
||||
PacketAccess = packet_traits<Scalar>::HasIsInf
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -25,7 +25,7 @@ typedef CwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived> RoundRetu
|
||||
typedef CwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived> FloorReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived> CeilReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isNaN_op<Scalar>, const Derived> IsNaNReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived> IsinfReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isInf_op<Scalar>, const Derived> IsInfReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_isFinite_op<Scalar>, const Derived> IsFiniteReturnType;
|
||||
|
||||
/** \returns an expression of the coefficient-wise absolute value of \c *this
|
||||
@ -370,7 +370,7 @@ ceil() const
|
||||
* Example: \include Cwise_isNaN.cpp
|
||||
* Output: \verbinclude Cwise_isNaN.out
|
||||
*
|
||||
* \sa isFinite(), isinf()
|
||||
* \sa isFinite(), isInf()
|
||||
*/
|
||||
inline const IsNaNReturnType
|
||||
isNaN() const
|
||||
@ -378,17 +378,17 @@ isNaN() const
|
||||
return IsNaNReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise isinf of *this.
|
||||
/** \returns an expression of the coefficient-wise isInf of *this.
|
||||
*
|
||||
* Example: \include Cwise_isinf.cpp
|
||||
* Output: \verbinclude Cwise_isinf.out
|
||||
* Example: \include Cwise_isInf.cpp
|
||||
* Output: \verbinclude Cwise_isInf.out
|
||||
*
|
||||
* \sa isNaN()
|
||||
*/
|
||||
inline const IsinfReturnType
|
||||
isinf() const
|
||||
inline const IsInfReturnType
|
||||
isInf() const
|
||||
{
|
||||
return IsinfReturnType(derived());
|
||||
return IsInfReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise isFinite of *this.
|
||||
|
@ -2,4 +2,4 @@ Array3d v(1,2,3);
|
||||
v(1) *= 0.0/0.0;
|
||||
v(2) /= 0.0;
|
||||
cout << v << endl << endl;
|
||||
cout << isinf(v) << endl;
|
||||
cout << isInf(v) << endl;
|
@ -214,7 +214,7 @@ template<typename ArrayType> void array_real(const ArrayType& m)
|
||||
VERIFY_IS_APPROX(m1.floor(), floor(m1));
|
||||
VERIFY_IS_APPROX(m1.ceil(), ceil(m1));
|
||||
VERIFY_IS_APPROX(m1.isNaN(), isNaN(m1));
|
||||
VERIFY_IS_APPROX(m1.isinf(), isinf(m1));
|
||||
VERIFY_IS_APPROX(m1.isInf(), isInf(m1));
|
||||
VERIFY_IS_APPROX(m1.isFinite(), isFinite(m1));
|
||||
VERIFY_IS_APPROX(m1.square(), square(m1));
|
||||
|
||||
@ -283,7 +283,7 @@ template<typename ArrayType> void array_complex(const ArrayType& m)
|
||||
VERIFY_IS_APPROX(m1.floor(), floor(m1));
|
||||
VERIFY_IS_APPROX(m1.ceil(), ceil(m1));
|
||||
VERIFY_IS_APPROX(m1.isNaN(), isNaN(m1));
|
||||
VERIFY_IS_APPROX(m1.isinf(), isinf(m1));
|
||||
VERIFY_IS_APPROX(m1.isInf(), isInf(m1));
|
||||
VERIFY_IS_APPROX(m1.isFinite(), isFinite(m1));
|
||||
VERIFY_IS_APPROX(m1.square(), square(m1));
|
||||
VERIFY_IS_APPROX(m1.sin(), sin(m1));
|
||||
|
Loading…
x
Reference in New Issue
Block a user