10 #ifndef EIGEN_NOALIAS_H 11 #define EIGEN_NOALIAS_H 14 #include "./InternalHeaderCheck.h" 33 template <
typename ExpressionType,
template <
typename>
class StorageBase>
36 typedef typename ExpressionType::Scalar Scalar;
38 EIGEN_DEVICE_FUNC
explicit NoAlias(ExpressionType& expression) : m_expression(expression) {}
40 template <
typename OtherDerived>
41 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ExpressionType& operator=(
const StorageBase<OtherDerived>& other) {
42 call_assignment_no_alias(m_expression, other.derived(),
43 internal::assign_op<Scalar, typename OtherDerived::Scalar>());
47 template <
typename OtherDerived>
48 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ExpressionType& operator+=(
const StorageBase<OtherDerived>& other) {
49 call_assignment_no_alias(m_expression, other.derived(),
50 internal::add_assign_op<Scalar, typename OtherDerived::Scalar>());
54 template <
typename OtherDerived>
55 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ExpressionType& operator-=(
const StorageBase<OtherDerived>& other) {
56 call_assignment_no_alias(m_expression, other.derived(),
57 internal::sub_assign_op<Scalar, typename OtherDerived::Scalar>());
61 EIGEN_DEVICE_FUNC ExpressionType& expression()
const {
return m_expression; }
64 ExpressionType& m_expression;
95 template <
typename Derived>
102 #endif // EIGEN_NOALIAS_H Pseudo expression providing an operator = assuming no aliasing.
Definition: NoAlias.h:34
Namespace containing all symbols from the Eigen library.
Definition: B01_Experimental.dox:1
NoAlias< Derived, Eigen::MatrixBase > noalias()
Definition: NoAlias.h:96