Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code? |

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

*To*: eigen <eigen@xxxxxxxxxxxxxxxxxxx>, Benoit Steiner <benoit.steiner.goog@xxxxxxxxx>, Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Subject*: Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?*From*: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>*Date*: Tue, 27 Jan 2015 18:30:49 -0500*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sPQf7D5/Pj1Sih+Mkh66Q1Euk/ubqKZIqyiO4JQkHRM=; b=apa2U8rWVE815sA7hBgjyM2pnHgeIuokKRWiB3jKt3uHBBIXuca+H/PrCOCfdXd2vo zBM70Dy57IJgj2uNb4mxvYcEW6j5UHa3RRLXwxPWRDEO0t13Z9fAcmttaNOS3ZuGZbWz y52huP5p3Kr5v5tktXKqlZWOy1Y7Ly86qvFz2o6TbMzg4i4+MFfu5UouFgLrtespPwtf 8Y3e7KBvB3APDF8z2vwverg3pE3LcUDwTwyqf5gUEfIvY7z5f74r3m9r/pzr3EITnCjC DQp+0ud6xWd0rFKCHWx/7gBJf4nJjRKoMOXXJKCtZX9/WCupFqxz4sV0W2EES+JwB+Ls cZ4A==

Benoit, Gael, could you confirm that this change is intentional?

Pro:improves perf of certain 4d ops

- regresses perf of 4f ops, as now Vector4f isn't aligned anymore!!!!

Benoit

2015-01-27 18:22 GMT-05:00 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:

Ouch... you're right. From Macros.h:

#if defined(__AVX__)

#undef EIGEN_ALIGN_BYTES

#define EIGEN_ALIGN_BYTES 32

#endif2015-01-27 18:19 GMT-05:00 Benoit Jacob <jacob.benoit..1@xxxxxxxxx>:BenoitOh --- I was still living in a world where the Eigen ABI is unaffected by vectorization, which was the case at least until AVX.Is alignof(Vector4d) actually 32 with AVX by default? So ABI is now dependent on compile flags?2015-01-27 18:17 GMT-05:00 Marc Glisse <marc.glisse@xxxxxxxx>:On Tue, 27 Jan 2015, Benoit Jacob wrote:

An approach that works is to #define Eigen EigenAVX, but this is very

annoying because you can't anymore pass around Eigen objects, you have to

somehow reinterpret_cast them to EigenAVX objects.

I would expect EigenAVX::Vector4d to have an alignment of 32, and only 16 for EigenSSE::Vector4d (I did not check), which would mean they really are different types and you cannot pass the second one to a function expecting the first. So I am not sure how you intend to "pass around Eigen objects".

--

Marc Glisse

**Follow-Ups**:**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Christoph Hertzberg

**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Gael Guennebaud

**References**:**[eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Benoit Jacob

**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Marc Glisse

**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Benoit Jacob

**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?** - Next by Date:
**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?** - Previous by thread:
**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?** - Next by thread:
**Re: [eigen] How do you link multiple versions (e.g. AVX vs SSE) of the same Eigen code?**

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