mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
First part of a big refactoring of alignment control to enable the handling of arbitrarily aligned buffers. It includes:
- AlignedBit flag is deprecated. Alignment is now specified by the evaluator through the 'Alignment' enum, e.g., evaluator<Xpr>::Alignment. Its value is in Bytes. - Add several enums to specify alignment: Aligned8, Aligned16, Aligned32, Aligned64, Aligned128. AlignedMax corresponds to EIGEN_MAX_ALIGN_BYTES. Such enums are used to define the above Alignment value, and as the 'Options' template parameter of Map<> and Ref<>. - The Aligned enum is now deprecated. It is now an alias for Aligned16. - Currently, traits<Matrix<>>, traits<Array<>>, traits<Ref<>>, traits<Map<>>, and traits<Block<>> also expose the Alignment enum.
This commit is contained in:
@@ -35,7 +35,6 @@ std::string demangle_flags(int f)
|
||||
if(f&LinearAccessBit) res += " | Linear";
|
||||
if(f&LvalueBit) res += " | Lvalue";
|
||||
if(f&DirectAccessBit) res += " | Direct";
|
||||
if(f&AlignedBit) res += " | Aligned";
|
||||
if(f&NestByRefBit) res += " | NestByRef";
|
||||
if(f&NoPreferredStorageOrderBit) res += " | NoPreferredStorageOrderBit";
|
||||
|
||||
@@ -204,12 +203,12 @@ template<typename Scalar, bool Enable = internal::packet_traits<Scalar>::Vectori
|
||||
LinearVectorizedTraversal,CompleteUnrolling));
|
||||
|
||||
VERIFY((test_assign<
|
||||
Map<Matrix22, Aligned, OuterStride<3*PacketSize> >,
|
||||
Map<Matrix22, AlignedMax, OuterStride<3*PacketSize> >,
|
||||
Matrix22
|
||||
>(InnerVectorizedTraversal,CompleteUnrolling)));
|
||||
|
||||
VERIFY((test_assign<
|
||||
Map<Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>, Aligned, InnerStride<3*PacketSize> >,
|
||||
Map<Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>, AlignedMax, InnerStride<3*PacketSize> >,
|
||||
Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>
|
||||
>(DefaultTraversal,CompleteUnrolling)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user