10#ifndef EIGEN_FORCEALIGNEDACCESS_H
11#define EIGEN_FORCEALIGNEDACCESS_H
29template<
typename ExpressionType>
30struct traits<ForceAlignedAccess<ExpressionType> > :
public traits<ExpressionType>
34template<
typename ExpressionType>
class ForceAlignedAccess
35 :
public internal::dense_xpr_base< ForceAlignedAccess<ExpressionType> >::type
39 typedef typename internal::dense_xpr_base<ForceAlignedAccess>::type Base;
40 EIGEN_DENSE_PUBLIC_INTERFACE(ForceAlignedAccess)
42 EIGEN_DEVICE_FUNC
explicit inline ForceAlignedAccess(
const ExpressionType& matrix) : m_expression(matrix) {}
44 EIGEN_DEVICE_FUNC
inline Index rows()
const {
return m_expression.rows(); }
45 EIGEN_DEVICE_FUNC
inline Index cols()
const {
return m_expression.cols(); }
46 EIGEN_DEVICE_FUNC
inline Index outerStride()
const {
return m_expression.outerStride(); }
47 EIGEN_DEVICE_FUNC
inline Index innerStride()
const {
return m_expression.innerStride(); }
49 EIGEN_DEVICE_FUNC
inline const CoeffReturnType coeff(Index row, Index col)
const
51 return m_expression.coeff(row, col);
54 EIGEN_DEVICE_FUNC
inline Scalar& coeffRef(Index row, Index col)
56 return m_expression.const_cast_derived().coeffRef(row, col);
59 EIGEN_DEVICE_FUNC
inline const CoeffReturnType coeff(Index index)
const
61 return m_expression.coeff(index);
64 EIGEN_DEVICE_FUNC
inline Scalar& coeffRef(Index index)
66 return m_expression.const_cast_derived().coeffRef(index);
69 template<
int LoadMode>
70 inline const PacketScalar packet(Index row, Index col)
const
72 return m_expression.template packet<Aligned>(row, col);
75 template<
int LoadMode>
76 inline void writePacket(Index row, Index col,
const PacketScalar& x)
78 m_expression.const_cast_derived().template writePacket<Aligned>(row, col, x);
81 template<
int LoadMode>
82 inline const PacketScalar packet(Index index)
const
84 return m_expression.template packet<Aligned>(index);
87 template<
int LoadMode>
88 inline void writePacket(Index index,
const PacketScalar& x)
90 m_expression.const_cast_derived().template writePacket<Aligned>(index, x);
93 EIGEN_DEVICE_FUNC
operator const ExpressionType&()
const {
return m_expression; }
96 const ExpressionType& m_expression;
99 ForceAlignedAccess& operator=(
const ForceAlignedAccess&);
105template<
typename Derived>
106inline const ForceAlignedAccess<Derived>
107MatrixBase<Derived>::forceAlignedAccess()
const
109 return ForceAlignedAccess<Derived>(derived());
115template<
typename Derived>
116inline ForceAlignedAccess<Derived>
117MatrixBase<Derived>::forceAlignedAccess()
119 return ForceAlignedAccess<Derived>(derived());
125template<
typename Derived>
127inline typename internal::add_const_on_value_type<typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type>::type
136template<
typename Derived>
138inline typename internal::conditional<Enable,ForceAlignedAccess<Derived>,Derived&>::type
Base class for all dense matrices, vectors, and expressions.
Definition ForwardDeclarations.h:76
Namespace containing all symbols from the Eigen library.
Definition Core:287