11#ifndef EIGEN_CWISE_BINARY_OP_H
12#define EIGEN_CWISE_BINARY_OP_H
37template<
typename BinaryOp,
typename Lhs,
typename Rhs>
42 typedef typename remove_all<Lhs>::type Ancestor;
61 BinaryOp>::ret StorageKind;
64 typedef typename Lhs::Nested LhsNested;
65 typedef typename Rhs::Nested RhsNested;
66 typedef typename remove_reference<LhsNested>::type _LhsNested;
67 typedef typename remove_reference<RhsNested>::type _RhsNested;
74template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
77template<
typename BinaryOp,
typename LhsType,
typename RhsType>
80 BinaryOp, LhsType, RhsType,
81 typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,
82 typename internal::traits<RhsType>::StorageKind,
95 BinaryOp>::ret>::Base Base;
100 typedef typename internal::remove_reference<LhsNested>::type _LhsNested;
101 typedef typename internal::remove_reference<RhsNested>::type _RhsNested;
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)
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;
147template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
159template<
typename Derived>
160template<
typename OtherDerived>
161EIGEN_STRONG_INLINE Derived &
172template<
typename Derived>
173template<
typename OtherDerived>
174EIGEN_STRONG_INLINE Derived &
Definition CwiseBinaryOp.h:150
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:85
EIGEN_DEVICE_FUNC const _LhsNested & lhs() const
Definition CwiseBinaryOp.h:132
EIGEN_DEVICE_FUNC const BinaryOp & functor() const
Definition CwiseBinaryOp.h:138
EIGEN_DEVICE_FUNC const _RhsNested & rhs() const
Definition CwiseBinaryOp.h:135
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Pseudo expression representing a solving operation.
Definition Solve.h:63
Definition XprHelper.h:50
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:61
Definition AssignmentFunctors.h:42
Definition XprHelper.h:445
Definition AssignmentFunctors.h:63
Definition ForwardDeclarations.h:17