Re: [eigen] vectorization and ABI |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] vectorization and ABI
- From: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>
- Date: Thu, 3 Jul 2008 10:22:11 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=rDhHYWb5pz51fyxDaOLO4Km+wgqm0oKPEJ3ohEJugro=; b=OtT9WiPB8U5823sSp/yirYYCTszvTLLlhlnalvRjMuaozFFm4J6o7/hD/2xP9fGc+y frMEImLWPoGtgbGHY+vGUuqbTJNH4Y6bQzJ2Cfu/fDFl2ysRiY0gF8yidxr5ScqMBXIy JXS7ZRlKqKoBfmIVHkSFisEGF84y1YmYaYBzo=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=FJrPPR799n7Pzy208L9UDAZD+hsrsuGruTERZ82RIvBsepMtzKA901yYDpWBAj0J1W hOmuTVAQ1UmOFMiMw2AZl7ZEJMhoOcLQY0Zxtt22rMHFGWqrXUD1b3/canzWiNJXb6El QLY3BAbT1MzYmsPe/BHv77H8nYRjdGxZRYcK4=
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
>