49 Flags = cwise_promote_storage_order<typename traits<Lhs>::StorageKind,
typename traits<Rhs>::StorageKind,_LhsNested::Flags &
RowMajorBit,_RhsNested::Flags &
RowMajorBit>::value
78 public CwiseBinaryOpImpl<
79 BinaryOp, LhsType, RhsType,
80 typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,
81 typename internal::traits<RhsType>::StorageKind,
83 internal::no_assignment_operator
87 typedef typename internal::remove_all<BinaryOp>::type Functor;
88 typedef typename internal::remove_all<LhsType>::type Lhs;
89 typedef typename internal::remove_all<RhsType>::type Rhs;
91 typedef typename CwiseBinaryOpImpl<
92 BinaryOp, LhsType, RhsType,
93 typename internal::cwise_promote_storage_type<typename internal::traits<LhsType>::StorageKind,
94 typename internal::traits<Rhs>::StorageKind,
95 BinaryOp>::ret>::Base Base;
96 EIGEN_GENERIC_PUBLIC_INTERFACE(CwiseBinaryOp)
98 typedef typename internal::ref_selector<LhsType>::type LhsNested;
99 typedef typename internal::ref_selector<RhsType>::type RhsNested;
100 typedef typename internal::remove_reference<LhsNested>::type _LhsNested;
101 typedef typename internal::remove_reference<RhsNested>::type _RhsNested;
103#if EIGEN_COMP_MSVC && EIGEN_HAS_CXX11
106 CwiseBinaryOp(
const CwiseBinaryOp<BinaryOp,LhsType,RhsType>&) =
default;
109 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
110 CwiseBinaryOp(
const Lhs& aLhs,
const Rhs& aRhs,
const BinaryOp& func = BinaryOp())
111 : m_lhs(aLhs), m_rhs(aRhs), m_functor(func)
113 EIGEN_CHECK_BINARY_COMPATIBILIY(BinaryOp,
typename Lhs::Scalar,
typename Rhs::Scalar);
115 EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(Lhs, Rhs)
116 eigen_assert(aLhs.rows() == aRhs.rows() && aLhs.cols() == aRhs.cols());
119 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
120 Index rows()
const EIGEN_NOEXCEPT {
122 return internal::traits<typename internal::remove_all<LhsNested>::type>::RowsAtCompileTime==
Dynamic ? m_rhs.rows() : m_lhs.rows();
124 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
125 Index cols()
const EIGEN_NOEXCEPT {
127 return internal::traits<typename internal::remove_all<LhsNested>::type>::ColsAtCompileTime==
Dynamic ? m_rhs.cols() : m_lhs.cols();
131 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
132 const _LhsNested&
lhs()
const {
return m_lhs; }
134 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
135 const _RhsNested&
rhs()
const {
return m_rhs; }
137 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
138 const BinaryOp&
functor()
const {
return m_functor; }
143 const BinaryOp m_functor;