12 #ifndef EIGEN_CWISE_TERNARY_OP_H
13 #define EIGEN_CWISE_TERNARY_OP_H
20 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
21 struct traits<CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> > {
24 typedef remove_all_t<Arg1> Ancestor;
25 typedef typename traits<Ancestor>::XprKind XprKind;
27 RowsAtCompileTime = traits<Ancestor>::RowsAtCompileTime,
28 ColsAtCompileTime = traits<Ancestor>::ColsAtCompileTime,
29 MaxRowsAtCompileTime = traits<Ancestor>::MaxRowsAtCompileTime,
30 MaxColsAtCompileTime = traits<Ancestor>::MaxColsAtCompileTime
36 typedef typename result_of<TernaryOp(
37 const typename Arg1::Scalar&,
const typename Arg2::Scalar&,
38 const typename Arg3::Scalar&)>::type Scalar;
40 typedef typename internal::traits<Arg1>::StorageKind StorageKind;
41 typedef typename internal::traits<Arg1>::StorageIndex StorageIndex;
43 typedef typename Arg1::Nested Arg1Nested;
44 typedef typename Arg2::Nested Arg2Nested;
45 typedef typename Arg3::Nested Arg3Nested;
46 typedef std::remove_reference_t<Arg1Nested> Arg1Nested_;
47 typedef std::remove_reference_t<Arg2Nested> Arg2Nested_;
48 typedef std::remove_reference_t<Arg3Nested> Arg3Nested_;
53 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3,
55 class CwiseTernaryOpImpl;
84 template <
typename TernaryOp,
typename Arg1Type,
typename Arg2Type,
87 TernaryOp, Arg1Type, Arg2Type, Arg3Type,
88 typename internal::traits<Arg1Type>::StorageKind>,
89 internal::no_assignment_operator
102 typename internal::traits<Arg1Type>::StorageKind,
103 typename internal::traits<Arg2Type>::StorageKind>::value),
104 STORAGE_KIND_MUST_MATCH)
106 typename internal::traits<Arg1Type>::StorageKind,
107 typename internal::traits<Arg3Type>::StorageKind>::value),
108 STORAGE_KIND_MUST_MATCH)
111 TernaryOp, Arg1Type, Arg2Type, Arg3Type,
112 typename internal::traits<Arg1Type>::StorageKind>
::Base Base;
125 const TernaryOp& func = TernaryOp())
127 eigen_assert(a1.rows() == a2.rows() && a1.cols() == a2.cols() &&
128 a1.rows() == a3.rows() && a1.cols() == a3.cols());
136 RowsAtCompileTime ==
Dynamic &&
141 RowsAtCompileTime ==
Dynamic &&
153 ColsAtCompileTime ==
Dynamic &&
158 ColsAtCompileTime ==
Dynamic &&
187 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3,
188 typename StorageKind>
190 :
public internal::generic_xpr_base<
191 CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >::type {
193 typedef typename internal::generic_xpr_base<
#define EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
#define EIGEN_DEVICE_FUNC
#define EIGEN_STATIC_ASSERT(X, MSG)
#define EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0, TYPE1)
internal::generic_xpr_base< CwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type > >::type Base
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
internal::remove_all_t< Arg3Type > Arg3
internal::remove_all_t< Arg2Type > Arg2
const Arg3Nested_ & arg3() const
internal::ref_selector< Arg3Type >::type Arg3Nested
internal::remove_all_t< Arg1Type > Arg1
std::remove_reference_t< Arg2Nested > Arg2Nested_
const Arg1Nested_ & arg1() const
std::remove_reference_t< Arg3Nested > Arg3Nested_
const TernaryOp & functor() const
std::remove_reference_t< Arg1Nested > Arg1Nested_
EIGEN_STATIC_ASSERT((internal::is_same< typename internal::traits< Arg1Type >::StorageKind, typename internal::traits< Arg2Type >::StorageKind >::value), STORAGE_KIND_MUST_MATCH) EIGEN_STATIC_ASSERT((internal typedef internal::ref_selector< Arg1Type >::type Arg1Nested
internal::ref_selector< Arg2Type >::type Arg2Nested
const TernaryOp m_functor
const Arg2Nested_ & arg2() const
const unsigned int RowMajorBit
typename remove_all< T >::type remove_all_t
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.