mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-11 23:51:49 +08:00
bug #1400: fix stableNorm with EIGEN_DONT_ALIGN_STATICALLY
(grafted from 659087b622e94f7e35a56b7ed2cb01b024c80a7b )
This commit is contained in:
parent
faf8af25ed
commit
f2e8f96151
@ -170,7 +170,8 @@ MatrixBase<Derived>::stableNorm() const
|
|||||||
enum {
|
enum {
|
||||||
CanAlign = ( (int(DerivedCopyClean::Flags)&DirectAccessBit)
|
CanAlign = ( (int(DerivedCopyClean::Flags)&DirectAccessBit)
|
||||||
|| (int(internal::evaluator<DerivedCopyClean>::Alignment)>0) // FIXME Alignment)>0 might not be enough
|
|| (int(internal::evaluator<DerivedCopyClean>::Alignment)>0) // FIXME Alignment)>0 might not be enough
|
||||||
) && (blockSize*sizeof(Scalar)*2<EIGEN_STACK_ALLOCATION_LIMIT) // ifwe cannot allocate on the stack, then let's not bother about this optimization
|
) && (blockSize*sizeof(Scalar)*2<EIGEN_STACK_ALLOCATION_LIMIT)
|
||||||
|
&& (EIGEN_MAX_STATIC_ALIGN_BYTES>0) // if we cannot allocate on the stack, then let's not bother about this optimization
|
||||||
};
|
};
|
||||||
typedef typename internal::conditional<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<DerivedCopyClean>::Alignment>,
|
typedef typename internal::conditional<CanAlign, Ref<const Matrix<Scalar,Dynamic,1,0,blockSize,1>, internal::evaluator<DerivedCopyClean>::Alignment>,
|
||||||
typename DerivedCopyClean::ConstSegmentReturnType>::type SegmentWrapper;
|
typename DerivedCopyClean::ConstSegmentReturnType>::type SegmentWrapper;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user