diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-26 16:06:41 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-06-26 16:06:41 +0000 |
commit | 25ba9f377c97968923cd654d419fa8ce260f114d (patch) | |
tree | 52003e7b8896a534603ecd161b31262aa8761fed /Eigen/src/Core/NestByValue.h | |
parent | 5b0da4b778d8f51e21dd7c35f6f7397c38c6be03 (diff) |
* add bench/benchVecAdd.cpp by Gael, fix crash (ei_pload on non-aligned)
* introduce packet(int), make use of it in linear vectorized paths
--> completely fixes the slowdown noticed in benchVecAdd.
* generalize coeff(int) to linear-access xprs
* clarify the access flag bits
* rework api dox in Coeffs.h and util/Constants.h
* improve certain expressions's flags, allowing more vectorization
* fix bug in Block: start(int) and end(int) returned dyn*dyn size
* fix bug in Block: just because the Eval type has packet access
doesn't imply the block xpr should have it too.
Diffstat (limited to 'Eigen/src/Core/NestByValue.h')
-rw-r--r-- | Eigen/src/Core/NestByValue.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Eigen/src/Core/NestByValue.h b/Eigen/src/Core/NestByValue.h index 0c6cdb114..a63202dfd 100644 --- a/Eigen/src/Core/NestByValue.h +++ b/Eigen/src/Core/NestByValue.h @@ -76,6 +76,16 @@ template<typename ExpressionType> class NestByValue return m_expression.const_cast_derived().coeffRef(row, col); } + inline const Scalar _coeff(int index) const + { + return m_expression.coeff(index); + } + + inline Scalar& _coeffRef(int index) + { + return m_expression.const_cast_derived().coeffRef(index); + } + template<int LoadMode> inline const PacketScalar _packet(int row, int col) const { @@ -88,6 +98,18 @@ template<typename ExpressionType> class NestByValue m_expression.const_cast_derived().template writePacket<LoadMode>(row, col, x); } + template<int LoadMode> + inline const PacketScalar _packet(int index) const + { + return m_expression.template packet<LoadMode>(index); + } + + template<int LoadMode> + inline void _writePacket(int index, const PacketScalar& x) + { + m_expression.const_cast_derived().template writePacket<LoadMode>(index, x); + } + protected: const ExpressionType m_expression; }; |