mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Big 279: enable mixing types for comparisons, min, and max.
This commit is contained in:
@@ -179,6 +179,8 @@ template<typename LhsScalar, typename RhsScalar, bool ConjLhs=false, bool ConjRh
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_sum_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_difference_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_conj_product_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_min_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_max_op;
|
||||
template<typename Scalar> struct scalar_opposite_op;
|
||||
template<typename Scalar> struct scalar_conjugate_op;
|
||||
template<typename Scalar> struct scalar_real_op;
|
||||
@@ -201,8 +203,6 @@ template<typename Scalar> struct scalar_cube_op;
|
||||
template<typename Scalar, typename NewType> struct scalar_cast_op;
|
||||
template<typename Scalar> struct scalar_multiple_op;
|
||||
template<typename Scalar> struct scalar_quotient1_op;
|
||||
template<typename Scalar> struct scalar_min_op;
|
||||
template<typename Scalar> struct scalar_max_op;
|
||||
template<typename Scalar> struct scalar_random_op;
|
||||
template<typename Scalar> struct scalar_add_op;
|
||||
template<typename Scalar> struct scalar_constant_op;
|
||||
@@ -212,9 +212,10 @@ template<typename Scalar> struct scalar_igamma_op;
|
||||
template<typename Scalar> struct scalar_igammac_op;
|
||||
template<typename Scalar> struct scalar_betainc_op;
|
||||
|
||||
template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_hypot_op;
|
||||
template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_product_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_multiple2_op;
|
||||
template<typename LhsScalar,typename RhsScalar=LhsScalar> struct scalar_quotient_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_multiple2_op;
|
||||
template<typename LhsScalar,typename RhsScalar> struct scalar_quotient2_op;
|
||||
|
||||
} // end namespace internal
|
||||
|
||||
@@ -876,15 +876,7 @@ namespace Eigen {
|
||||
|
||||
#define EIGEN_IMPLIES(a,b) (!(a) || (b))
|
||||
|
||||
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR) \
|
||||
template<typename OtherDerived> \
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived> \
|
||||
(METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
||||
{ \
|
||||
return CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived>(derived(), other.derived()); \
|
||||
}
|
||||
|
||||
// the expression type of a cwise product
|
||||
// the expression type of a standard coefficient wise binary operation
|
||||
#define EIGEN_CWISE_BINARY_RETURN_TYPE(LHS,RHS,OPNAME) \
|
||||
CwiseBinaryOp< \
|
||||
EIGEN_CAT(EIGEN_CAT(internal::scalar_,OPNAME),_op)< \
|
||||
@@ -895,6 +887,14 @@ namespace Eigen {
|
||||
const RHS \
|
||||
>
|
||||
|
||||
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,OPNAME) \
|
||||
template<typename OtherDerived> \
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME) \
|
||||
(METHOD)(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
||||
{ \
|
||||
return EIGEN_CWISE_BINARY_RETURN_TYPE(Derived,OtherDerived,OPNAME)(derived(), other.derived()); \
|
||||
}
|
||||
|
||||
#ifdef EIGEN_EXCEPTIONS
|
||||
# define EIGEN_THROW_X(X) throw X
|
||||
# define EIGEN_THROW throw
|
||||
|
||||
Reference in New Issue
Block a user