Re: [eigen] General questions about vectorization/alignment AGAIN

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


Hi Hauke (this is strange, feels like I am talking to myself),

as far as I am informed your first question must unfortunately be
answered with "NO" but I am not 100% sure. It is at least nothing you
should bet on when working with any kind of production code. I can
only tell you that at least for MSVC 2008 and 2010 systems almost all
alignment issues go away (EIGEN_MAKE_ALIGNED_OPERATOR_NEW, and the STL
issues). You will still need to declare static arrays to be aligned,
as in this example

EIGEN_ALIGN16 double errors[2];

The Eigen::aligned_allocator is a standard allocator and should be
100% STL compatible - so you can use it all over the place and it
should be working fine with std::tr1::unordered_map and nesting STL
types that use Eigen::aligned_allocator is also not a problem.

Likewise, using EIGEN_MAKE_ALIGNED_OPERATOR_NEW does not hurt at all.
I can be used in any class and does not require any Eigen members.

Note that you can even prevent the explicit usage of
"aligned_allocator" by using

EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Vector4d)

when you want to put Vector4d into STL vectors. Eigen will then use
"aligned_allocator" only when it is required which means that it will
fall back to STL only implementations on systems where the additional
overhead is not needed (currently this is only true for 64bit MSVC
builds, see also the header Eigen/StdVector). Similar macros are
offered for map, list, etc.

Regards,
Hauke



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