|Re: [eigen] General questions about vectorization/alignment AGAIN|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] General questions about vectorization/alignment AGAIN
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Mon, 17 Jan 2011 22:26:29 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=cyLr5y4IayJOry9Vynd0o9TUvHhpuG4vCHC6hAlE4M0=; b=kSAzgebOjbtLq3AaFb10KNDKwTjdGSjOAMG1+7l4dqrN5DhnQ7jK5ON+TVWIy2oGDG EBifEyqjqe/Nwek4AZMJE93a0n1mCXi+nZHFsLiEcxUDyfQKVh2/s2XFC3t9eyH2JMjr GRfsmxqqmXlUgWpr8uqF6YP1vg4SDlIMM+x/k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=ISfpK64fb2apZYHjm+OR+ldqRCRodXPVTCbe18ZRM1IvEUBSrpl3fcQXJnc7S08CV4 1mudDo/oCAMkx4Ye4HfKcWzDwDpl3QN8FrncIqE43bq161dzDTHhxTfyfalSLEsgzaSU mAvXEUeuJgL3iAWOkXoBzr2/NVXNhs5orD0Pg=
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;
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
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.