11 #ifndef EIGEN_CWISE_BINARY_OP_H 12 #define EIGEN_CWISE_BINARY_OP_H 17 template<
typename BinaryOp,
typename Lhs,
typename Rhs>
35 const typename Lhs::Scalar&,
36 const typename Rhs::Scalar&
41 BinaryOp>::ret StorageKind;
44 typedef typename Lhs::Nested LhsNested;
45 typedef typename Rhs::Nested RhsNested;
54 template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
76 template<
typename BinaryOp,
typename LhsType,
typename RhsType>
79 BinaryOp, LhsType, RhsType,
80 typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,
81 typename internal::traits<RhsType>::StorageKind,
92 BinaryOp, LhsType, RhsType,
95 BinaryOp>::ret>::Base Base;
104 EIGEN_STRONG_INLINE
CwiseBinaryOp(
const Lhs& aLhs,
const Rhs& aRhs,
const BinaryOp&
func = BinaryOp())
105 : m_lhs(aLhs), m_rhs(aRhs), m_functor(
func)
107 EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,
typename Lhs::Scalar,
typename Rhs::Scalar);
109 EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
110 eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());
114 EIGEN_STRONG_INLINE
Index rows()
const {
122 EIGEN_STRONG_INLINE
Index cols()
const {
132 const _LhsNested&
lhs()
const {
return m_lhs; }
135 const _RhsNested&
rhs()
const {
return m_rhs; }
138 const BinaryOp&
functor()
const {
return m_functor; }
143 const BinaryOp m_functor;
147 template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
159 template<
typename Derived>
160 template<
typename OtherDerived>
161 EIGEN_STRONG_INLINE Derived &
172 template<
typename Derived>
173 template<
typename OtherDerived>
174 EIGEN_STRONG_INLINE Derived &
183 #endif // EIGEN_CWISE_BINARY_OP_H
Definition: AssignmentFunctors.h:67
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_DEVICE_FUNC const _RhsNested & rhs() const
Definition: CwiseBinaryOp.h:135
Definition: CwiseBinaryOp.h:55
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition: CwiseBinaryOp.h:77
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
EIGEN_DEVICE_FUNC const BinaryOp & functor() const
Definition: CwiseBinaryOp.h:138
Definition: benchGeometry.cpp:23
Definition: BandTriangularSolver.h:13
Definition: AssignmentFunctors.h:46
Definition: XprHelper.h:481
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
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: ForwardDeclarations.h:17
EIGEN_DEVICE_FUNC const _LhsNested & lhs() const
Definition: CwiseBinaryOp.h:132