diff options
author | Gael Guennebaud <g.gael@free.fr> | 2016-10-24 22:16:48 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2016-10-24 22:16:48 +0200 |
commit | 9e8f07d7b5d26805c1946d36ce272a09226edd2e (patch) | |
tree | f1131756e520f49185a54c0152cbcf91b6f0c54a /Eigen/src/Core/ArrayWrapper.h | |
parent | b027d7a8cfc45fa3f7d6c2162bb76677942dc04a (diff) |
Cleanup ArrayWrapper and MatrixWrapper by removing redundant accessors.
Diffstat (limited to 'Eigen/src/Core/ArrayWrapper.h')
-rw-r--r-- | Eigen/src/Core/ArrayWrapper.h | 100 |
1 files changed, 4 insertions, 96 deletions
diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index 6013d4d85..a04521a16 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -54,6 +54,8 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> > typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType; + using Base::coeffRef; + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE ArrayWrapper(ExpressionType& matrix) : m_expression(matrix) {} @@ -72,65 +74,17 @@ class ArrayWrapper : public ArrayBase<ArrayWrapper<ExpressionType> > inline const Scalar* data() const { return m_expression.data(); } EIGEN_DEVICE_FUNC - inline CoeffReturnType coeff(Index rowId, Index colId) const - { - return m_expression.coeff(rowId, colId); - } - - EIGEN_DEVICE_FUNC - inline Scalar& coeffRef(Index rowId, Index colId) - { - return m_expression.coeffRef(rowId, colId); - } - - EIGEN_DEVICE_FUNC inline const Scalar& coeffRef(Index rowId, Index colId) const { return m_expression.coeffRef(rowId, colId); } EIGEN_DEVICE_FUNC - inline CoeffReturnType coeff(Index index) const - { - return m_expression.coeff(index); - } - - EIGEN_DEVICE_FUNC - inline Scalar& coeffRef(Index index) - { - return m_expression.coeffRef(index); - } - - EIGEN_DEVICE_FUNC inline const Scalar& coeffRef(Index index) const { return m_expression.coeffRef(index); } - template<int LoadMode> - inline const PacketScalar packet(Index rowId, Index colId) const - { - return m_expression.template packet<LoadMode>(rowId, colId); - } - - template<int LoadMode> - inline void writePacket(Index rowId, Index colId, const PacketScalar& val) - { - m_expression.template writePacket<LoadMode>(rowId, colId, val); - } - - template<int LoadMode> - inline const PacketScalar packet(Index index) const - { - return m_expression.template packet<LoadMode>(index); - } - - template<int LoadMode> - inline void writePacket(Index index, const PacketScalar& val) - { - m_expression.template writePacket<LoadMode>(index, val); - } - template<typename Dest> EIGEN_DEVICE_FUNC inline void evalTo(Dest& dst) const { dst = m_expression; } @@ -197,6 +151,8 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> > typedef typename internal::ref_selector<ExpressionType>::non_const_type NestedExpressionType; + using Base::coeffRef; + EIGEN_DEVICE_FUNC explicit inline MatrixWrapper(ExpressionType& matrix) : m_expression(matrix) {} @@ -215,65 +171,17 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> > inline const Scalar* data() const { return m_expression.data(); } EIGEN_DEVICE_FUNC - inline CoeffReturnType coeff(Index rowId, Index colId) const - { - return m_expression.coeff(rowId, colId); - } - - EIGEN_DEVICE_FUNC - inline Scalar& coeffRef(Index rowId, Index colId) - { - return m_expression.coeffRef(rowId, colId); - } - - EIGEN_DEVICE_FUNC inline const Scalar& coeffRef(Index rowId, Index colId) const { return m_expression.derived().coeffRef(rowId, colId); } EIGEN_DEVICE_FUNC - inline CoeffReturnType coeff(Index index) const - { - return m_expression.coeff(index); - } - - EIGEN_DEVICE_FUNC - inline Scalar& coeffRef(Index index) - { - return m_expression.coeffRef(index); - } - - EIGEN_DEVICE_FUNC inline const Scalar& coeffRef(Index index) const { return m_expression.coeffRef(index); } - template<int LoadMode> - inline const PacketScalar packet(Index rowId, Index colId) const - { - return m_expression.template packet<LoadMode>(rowId, colId); - } - - template<int LoadMode> - inline void writePacket(Index rowId, Index colId, const PacketScalar& val) - { - m_expression.template writePacket<LoadMode>(rowId, colId, val); - } - - template<int LoadMode> - inline const PacketScalar packet(Index index) const - { - return m_expression.template packet<LoadMode>(index); - } - - template<int LoadMode> - inline void writePacket(Index index, const PacketScalar& val) - { - m_expression.template writePacket<LoadMode>(index, val); - } - EIGEN_DEVICE_FUNC const typename internal::remove_all<NestedExpressionType>::type& nestedExpression() const |