diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 16:30:14 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 16:30:14 +0100 |
commit | 4af1753b6fa83e2c0013f38e6d9e8538896d9d3c (patch) | |
tree | 65d8d1573ba8505e30f22e5939b804f0206135de /Eigen/src/Core/StableNorm.h | |
parent | eb8f4500719b52f410c545f738d8fda399cea587 (diff) |
* remove EnforceAlignedAccess option to Block, VectorBlock, Map and MapBase
because thanks to the previous commit this is not needed anymore
* add a more general ForceAlignedAccess expression which can be used for any expression.
It is already used by StableNorm.h.
Diffstat (limited to 'Eigen/src/Core/StableNorm.h')
-rw-r--r-- | Eigen/src/Core/StableNorm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/StableNorm.h b/Eigen/src/Core/StableNorm.h index b08f4a1ae..c2dd6b847 100644 --- a/Eigen/src/Core/StableNorm.h +++ b/Eigen/src/Core/StableNorm.h @@ -59,7 +59,7 @@ MatrixBase<Derived>::stableNorm() const RealScalar invScale = 1; RealScalar ssq = 0; // sum of square enum { - Alignment = (int(Flags)&DirectAccessBit) || (int(Flags)&AlignedBit) ? EnforceAlignedAccess : AsRequested + Alignment = (int(Flags)&DirectAccessBit) || (int(Flags)&AlignedBit) ? 1 : 0 }; int n = size(); int bi=0; @@ -70,7 +70,7 @@ MatrixBase<Derived>::stableNorm() const ei_stable_norm_kernel(start(bi), ssq, scale, invScale); } for (; bi<n; bi+=blockSize) - ei_stable_norm_kernel(VectorBlock<Derived,Dynamic,Alignment>(derived(),bi,std::min(blockSize, n - bi)), ssq, scale, invScale); + ei_stable_norm_kernel(segment(bi,std::min(blockSize, n - bi)).template forceAlignedAccessIf<Alignment>(), ssq, scale, invScale); return scale * ei_sqrt(ssq); } |