12 #ifndef EIGEN_CWISE_TERNARY_OP_H 13 #define EIGEN_CWISE_TERNARY_OP_H 18 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3>
35 const typename Arg1::Scalar&,
const typename Arg2::Scalar&,
36 const typename Arg3::Scalar&)>::type Scalar;
41 typedef typename Arg1::Nested Arg1Nested;
42 typedef typename Arg2::Nested Arg2Nested;
43 typedef typename Arg3::Nested Arg3Nested;
51 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3,
82 template <
typename TernaryOp,
typename Arg1Type,
typename Arg2Type,
85 TernaryOp, Arg1Type, Arg2Type, Arg3Type,
86 typename internal::traits<Arg1Type>::StorageKind>,
95 TernaryOp, Arg1Type, Arg2Type, Arg3Type,
107 EIGEN_STRONG_INLINE
CwiseTernaryOp(
const Arg1& a1,
const Arg2& a2,
109 const TernaryOp&
func = TernaryOp())
110 : m_arg1(a1), m_arg2(a2), m_arg3(a3), m_functor(
func) {
112 EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Arg1, Arg2)
113 EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Arg1, Arg3)
119 STORAGE_KIND_MUST_MATCH)
123 STORAGE_KIND_MUST_MATCH)
125 eigen_assert(a1.rows() == a2.rows() && a1.cols() == a2.cols() &&
126 a1.rows() == a3.rows() && a1.cols() == a3.cols());
130 EIGEN_STRONG_INLINE
Index rows()
const {
134 RowsAtCompileTime ==
Dynamic &&
137 return m_arg3.rows();
139 RowsAtCompileTime ==
Dynamic &&
142 return m_arg2.rows();
144 return m_arg1.rows();
147 EIGEN_STRONG_INLINE
Index cols()
const {
151 ColsAtCompileTime ==
Dynamic &&
154 return m_arg3.cols();
156 ColsAtCompileTime ==
Dynamic &&
159 return m_arg2.cols();
161 return m_arg1.cols();
166 const _Arg1Nested&
arg1()
const {
return m_arg1; }
169 const _Arg2Nested&
arg2()
const {
return m_arg2; }
172 const _Arg3Nested&
arg3()
const {
return m_arg3; }
175 const TernaryOp&
functor()
const {
return m_functor; }
181 const TernaryOp m_functor;
185 template <
typename TernaryOp,
typename Arg1,
typename Arg2,
typename Arg3,
186 typename StorageKind>
189 CwiseTernaryOp<TernaryOp, Arg1, Arg2, Arg3> >::type {
197 #endif // EIGEN_CWISE_TERNARY_OP_H Definition: CwiseTernaryOp.h:53
EIGEN_DEVICE_FUNC const TernaryOp & functor() const
Definition: CwiseTernaryOp.h:175
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
Definition: XprHelper.h:89
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Generic expression where a coefficient-wise ternary operator is applied to two expressions.
Definition: CwiseTernaryOp.h:84
EIGEN_DEVICE_FUNC const _Arg1Nested & arg1() const
Definition: CwiseTernaryOp.h:166
EIGEN_DEVICE_FUNC const _Arg3Nested & arg3() const
Definition: CwiseTernaryOp.h:172
Definition: benchGeometry.cpp:23
Definition: BandTriangularSolver.h:13
Definition: XprHelper.h:481
EIGEN_DEVICE_FUNC const _Arg2Nested & arg2() const
Definition: CwiseTernaryOp.h:169
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
Definition: ForwardDeclarations.h:17