mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* Fix bug #79: ei_alignmentOffset was assuming that ptr is multiple of
sizeof(Scalar), and that assumption breaks with double on linux x86-32. * Rename ei_alignmentOffset to ei_first_aligned * Rewrite its documentation and part of its body * The variant taking a MatrixBase doesn't need a separate size argument.
This commit is contained in:
@@ -124,7 +124,7 @@ public :
|
||||
Scalar* A0 = dst.data() + j*dst.stride();
|
||||
int starti = j;
|
||||
int alignedEnd = starti;
|
||||
int alignedStart = (starti) + ei_alignmentOffset(&A0[starti], size-starti);
|
||||
int alignedStart = (starti) + ei_first_aligned(&A0[starti], size-starti);
|
||||
alignedEnd = alignedStart + ((size-alignedStart)/(2*PacketSize))*(PacketSize*2);
|
||||
|
||||
// do the non-vectorizable part of the assignment
|
||||
|
||||
@@ -265,7 +265,7 @@ public :
|
||||
|
||||
int starti = j+2;
|
||||
int alignedEnd = starti;
|
||||
int alignedStart = (starti) + ei_alignmentOffset(&X[starti], N-starti);
|
||||
int alignedStart = (starti) + ei_first_aligned(&X[starti], N-starti);
|
||||
alignedEnd = alignedStart + ((N-alignedStart)/(PacketSize))*(PacketSize);
|
||||
|
||||
X[j] += t0 * A0[j];
|
||||
|
||||
Reference in New Issue
Block a user