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/Map.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/Map.h')
-rw-r--r-- | Eigen/src/Core/Map.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index f4c660af9..bcd72bdb8 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -80,6 +80,16 @@ template<typename MatrixType> class Map return const_cast<Scalar*>(m_data)[row + col * m_rows]; } + inline const Scalar& _coeff(int index) const + { + return m_data[index]; + } + + inline Scalar& _coeffRef(int index) + { + return m_data[index]; + } + public: inline Map(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols) { |