mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-27 23:32:02 +08:00
fix brain dead computation of the aligned bit.
When using a max-size that is fixed and not a multiple of 16 bit, we're not aligned.
This commit is contained in:
parent
ad8b6c2342
commit
eaa81c135a
@ -96,8 +96,12 @@ class ei_compute_matrix_flags
|
|||||||
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
|
row_major_bit = Options&RowMajor ? RowMajorBit : 0,
|
||||||
inner_max_size = row_major_bit ? MaxCols : MaxRows,
|
inner_max_size = row_major_bit ? MaxCols : MaxRows,
|
||||||
is_big = inner_max_size == Dynamic,
|
is_big = inner_max_size == Dynamic,
|
||||||
is_packet_size_multiple = (Cols*Rows) % ei_packet_traits<Scalar>::size == 0,
|
storage_has_fixed_size = MaxRows != Dynamic && MaxCols != Dynamic,
|
||||||
aligned_bit = ((Options&AutoAlign) && (is_big || is_packet_size_multiple)) ? AlignedBit : 0,
|
storage_has_aligned_fixed_size = storage_has_fixed_size
|
||||||
|
&& ( (MaxCols*MaxRows) % ei_packet_traits<Scalar>::size == 0 ),
|
||||||
|
aligned_bit = ( (Options&AutoAlign)
|
||||||
|
&& (is_big || storage_has_aligned_fixed_size)
|
||||||
|
) ? AlignedBit : 0,
|
||||||
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
packet_access_bit = ei_packet_traits<Scalar>::size > 1 && aligned_bit ? PacketAccessBit : 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user