11 #ifndef EIGEN_EIGENBASE_H 12 #define EIGEN_EIGENBASE_H 15 #include "./InternalHeaderCheck.h" 32 template <
typename Derived>
46 typedef typename internal::traits<Derived>::StorageKind StorageKind;
49 EIGEN_DEVICE_FUNC constexpr Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
51 EIGEN_DEVICE_FUNC constexpr
const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
53 EIGEN_DEVICE_FUNC
inline constexpr Derived& const_cast_derived()
const {
54 return *
static_cast<Derived*
>(
const_cast<EigenBase*
>(
this));
56 EIGEN_DEVICE_FUNC
inline const Derived& const_derived()
const {
return *
static_cast<const Derived*
>(
this); }
67 template <
typename Dest>
68 EIGEN_DEVICE_FUNC
inline void evalTo(Dest& dst)
const {
73 template <
typename Dest>
74 EIGEN_DEVICE_FUNC
inline void addTo(Dest& dst)
const {
77 typename Dest::PlainObject res(
rows(),
cols());
83 template <
typename Dest>
84 EIGEN_DEVICE_FUNC
inline void subTo(Dest& dst)
const {
87 typename Dest::PlainObject res(
rows(),
cols());
93 template <
typename Dest>
94 EIGEN_DEVICE_FUNC
inline void applyThisOnTheRight(Dest& dst)
const {
101 template <
typename Dest>
102 EIGEN_DEVICE_FUNC
inline void applyThisOnTheLeft(Dest& dst)
const {
108 template <
typename Device>
109 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper<Derived, Device> device(Device& device);
110 template <
typename Device>
111 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper<const Derived, Device> device(Device& device)
const;
126 template <
typename Derived>
127 template <
typename OtherDerived>
129 call_assignment(derived(), other.
derived());
133 template <
typename Derived>
134 template <
typename OtherDerived>
136 call_assignment(derived(), other.
derived(), internal::add_assign_op<Scalar, typename OtherDerived::Scalar>());
140 template <
typename Derived>
141 template <
typename OtherDerived>
142 EIGEN_DEVICE_FUNC Derived& DenseBase<Derived>::operator-=(
const EigenBase<OtherDerived>& other) {
143 call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar, typename OtherDerived::Scalar>());
149 #endif // EIGEN_EIGENBASE_H constexpr Index size() const noexcept
Definition: EigenBase.h:64
Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
Derived & operator=(const DenseBase< OtherDerived > &other)
Definition: Assign.h:39
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:38
constexpr Index rows() const noexcept
Definition: EigenBase.h:59
Definition: EigenBase.h:33
constexpr Index cols() const noexcept
Definition: EigenBase.h:61
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
constexpr Derived & derived()
Definition: EigenBase.h:49