Re: [eigen] vectorization and ABI

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


Hi,

I'm not sure to understand what you wanna do with ActualPacketAccess,
but I see at least two other workarounds:

- using preprocessor #if/#endif directives in Assign.h (and everywhere
we enable vectorization)

- using a macro or a meta structure to get the actual value of
Flags&PacketAccessBit...for instance:
instead for writing : Derived::Flags&PacketAccessBit you would write:
  EI_HAS_PACKET_ACCESS(Derived)

and currently  I'm in favor of such a macro: easy to use, no
compilation time penalty.

cheers,
gael.

On Thu, Jul 3, 2008 at 8:57 AM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote:
> Hi,
>
> I think again that we need to make sure that enabling/disabling vectorization
> does not affect the ABI. The use case is for apps who want to make a runtime
> switch for vectorization. They would compile the same file a.cpp with and
> without -msse2. If a.cpp contains functions that take (refs to) Eigen
> matrices as argument, this requires the type of Eigen matrices to be
> independent of whether -msse2 is used. This is currently not the case since
> PacketAccessBit is set to 0 unless vectorization is enabled. So I think we
> must change that. I understand that setting PacketAccessBit to 0 was a nice
> convenience to quickly ensure that vectorized paths are never used without
> vectorization support, but we can do without... so I'm for setting
> PacketAccessBit regardless of the vectorization switch; and we could have
> another constant ActualPacketAccess that is the same thing that is currently
> called PacketAccessBit. What do you think? I know we discussed that before
> but I don't remember clearly the outcome.
>
> Cheers,
>
> Benoit
>


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