11#ifndef EIGEN_EIGENBASE_H
12#define EIGEN_EIGENBASE_H
15#include "./InternalHeaderCheck.h"
32template <
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 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); }
59 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
inline Index rows() const EIGEN_NOEXCEPT {
return derived().rows(); }
61 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
inline Index cols() const EIGEN_NOEXCEPT {
return derived().cols(); }
64 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
inline Index size() const EIGEN_NOEXCEPT {
return rows() *
cols(); }
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;
126template <
typename Derived>
127template <
typename OtherDerived>
129 call_assignment(derived(), other.derived());
133template <
typename Derived>
134template <
typename OtherDerived>
136 call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar, typename OtherDerived::Scalar>());
140template <
typename Derived>
141template <
typename OtherDerived>
142EIGEN_DEVICE_FUNC Derived& DenseBase<Derived>::operator-=(
const EigenBase<OtherDerived>& other) {
143 call_assignment(derived(), other.derived(), internal::sub_assign_op<Scalar, typename OtherDerived::Scalar>());
101 template <
typename Dest> {
…}
Derived & operator=(const DenseBase< OtherDerived > &other)
Definition Assign.h:39
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:82
Definition ForwardDeclarations.h:57
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition EigenBase.h:61
constexpr Derived & derived()
Definition EigenBase.h:49
Eigen::Index Index
Definition EigenBase.h:43
constexpr const Derived & derived() const
Definition EigenBase.h:51
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition EigenBase.h:59
EIGEN_CONSTEXPR Index size() const EIGEN_NOEXCEPT
Definition EigenBase.h:64