Re: [eigen] Alignment issues

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





On Thu, Feb 13, 2014 at 5:21 PM, Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On 14.02.2014 01:14, Nicola Gigante wrote:
I would not trust ideone at all to deduce anything serious, so let’s
move to clang’s results...

We still want to support 32bit systems, which ideone appears to be using.


In your test program, requesting an alignment of 128 bytes is asking
for troubles. The standard only guarantees support for alignment up
to alignof(std::max_align_t), which on OS X 64bits is 16.

If every malloc result is 16 byte aligned (on 64bit systems) anyways and the behavior of alignas is unspezified above 16 bytes, that means essentially alignas has no influence on new/new[]?
Apparrently, on 32bit systems alignof(std::max_align_t) is 8 and malloc/new/new[] are 8byte aligned anywas ...

Furthermore, in the future we might want 32byte alignment for some AVX instructions (this will require quite some refactoring of our packet logic, however).

FWIW, the future is now: https://bitbucket.org/eigen/eigen/pull-request/42/added-support-for-avx-to-eigen/diff 




Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------





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