11#ifndef EIGEN_CWISE_BINARY_OP_H
12#define EIGEN_CWISE_BINARY_OP_H
17template<
typename BinaryOp,
typename Lhs,
typename Rhs>
22 typedef typename remove_all<Lhs>::type Ancestor;
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;
46 typedef typename remove_reference<LhsNested>::type _LhsNested;
47 typedef typename remove_reference<RhsNested>::type _RhsNested;
54template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
76template<
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,
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;
95 BinaryOp>::ret>::Base Base;
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
109 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
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)
119 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
120 Index rows()
const EIGEN_NOEXCEPT {
124 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR
125 Index cols()
const EIGEN_NOEXCEPT {
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;
147template<
typename BinaryOp,
typename Lhs,
typename Rhs,
typename StorageKind>
159template<
typename Derived>
160template<
typename OtherDerived>
161EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
172template<
typename Derived>
173template<
typename OtherDerived>
174EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived &
Definition CwiseBinaryOp.h:150
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:84
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const _RhsNested & rhs() const
Definition CwiseBinaryOp.h:135
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const BinaryOp & functor() const
Definition CwiseBinaryOp.h:138
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const _LhsNested & lhs() const
Definition CwiseBinaryOp.h:132
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Definition XprHelper.h:110
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition Constants.h:22
Definition AssignmentFunctors.h:46
Definition XprHelper.h:501
Definition AssignmentFunctors.h:67
Definition ForwardDeclarations.h:17