mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
fix #76, MayLinearVectorize depends on MaxSizeAtCompileTime and not on MaxInnerSize
This commit is contained in:
parent
0b5853d917
commit
24302ad5cd
@ -49,6 +49,7 @@ private:
|
|||||||
InnerMaxSize = int(Derived::Flags)&RowMajorBit
|
InnerMaxSize = int(Derived::Flags)&RowMajorBit
|
||||||
? Derived::MaxColsAtCompileTime
|
? Derived::MaxColsAtCompileTime
|
||||||
: Derived::MaxRowsAtCompileTime,
|
: Derived::MaxRowsAtCompileTime,
|
||||||
|
MaxSizeAtCompileTime = ei_size_at_compile_time<Derived::MaxColsAtCompileTime,Derived::MaxRowsAtCompileTime>::ret,
|
||||||
PacketSize = ei_packet_traits<typename Derived::Scalar>::size
|
PacketSize = ei_packet_traits<typename Derived::Scalar>::size
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -60,9 +61,9 @@ private:
|
|||||||
&& int(DstIsAligned) && int(SrcIsAligned),
|
&& int(DstIsAligned) && int(SrcIsAligned),
|
||||||
MayLinearize = StorageOrdersAgree && (int(Derived::Flags) & int(OtherDerived::Flags) & LinearAccessBit),
|
MayLinearize = StorageOrdersAgree && (int(Derived::Flags) & int(OtherDerived::Flags) & LinearAccessBit),
|
||||||
MayLinearVectorize = MightVectorize && MayLinearize
|
MayLinearVectorize = MightVectorize && MayLinearize
|
||||||
&& (DstIsAligned || InnerMaxSize == Dynamic),
|
&& (DstIsAligned || MaxSizeAtCompileTime == Dynamic),
|
||||||
/* If the destination isn't aligned, we have to do runtime checks and we don't unroll,
|
/* If the destination isn't aligned, we have to do runtime checks and we don't unroll,
|
||||||
so it's only good for large enough sizes. See remark below about InnerMaxSize. */
|
so it's only good for large enough sizes. */
|
||||||
MaySliceVectorize = MightVectorize && int(InnerMaxSize)>=3*PacketSize
|
MaySliceVectorize = MightVectorize && int(InnerMaxSize)>=3*PacketSize
|
||||||
/* slice vectorization can be slow, so we only want it if the slices are big, which is
|
/* slice vectorization can be slow, so we only want it if the slices are big, which is
|
||||||
indicated by InnerMaxSize rather than InnerSize, think of the case of a dynamic block
|
indicated by InnerMaxSize rather than InnerSize, think of the case of a dynamic block
|
||||||
|
Loading…
x
Reference in New Issue
Block a user