Re: [eigen] UnalignedArrayAssert and EIGEN_DONT_VECTORIZE

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi Benoit,

On Tue, 2009-09-08 at 12:12 -0400, Benoit Jacob wrote:
> In the development branch, there is EIGEN_DONT_ALIGN which is what
> you're really looking for (and breaks ABI compatibility). Of course,
> EIGEN_DONT_ALIGN also disables vectorization.

I don't mind it aligning things as long as everything works. And I guess
it might actually help auto-vectorization, if enabled.

EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT seems like the way to go, for now
at least.

> In 2.0.5 you can either manually disable alignment by editing
> EIGEN_ARCH_WANTS_ALIGNMENT, or you can use your idea:
> 
> > Is it safe to define
> > EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT when EIGEN_DONT_VECTORIZE is
> > defined?
> 
> Yes, it is safe. Since no SIMD instruction is then used, nothing bad
> can happen in case of a non-128bit-aligned pointer.
> 
> We don't do it automatically because that leads to the curious
> situation where code that runs fine without vectorization suddenly
> crashes when enabling vectorization. But go ahead if that's what you
> want :)

Got it, thanks. And no, I don't care about ABI compatibility since Eigen
is used internally only. But nonetheless, those are all good things to
know.

/Staffan

Attachment: signature.asc
Description: This is a digitally signed message part



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/