This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen::aligned_allocator

Tags: None
(comma "," separated)
gsibley
Registered Member
Posts
1
Karma
0

Eigen::aligned_allocator

Fri Dec 04, 2009 3:49 pm
Quick question -- is Eigen::aligned_allocator always going to be necessary for stl vectors in future versions of Eigen? Or will users finally be able to write:

using namespace Eigen;
using namespace std;
vector<Matrix4d> v;

???

thanks!
Gabe
Hauke
Registered Member
Posts
109
Karma
3
OS

Re: Eigen::aligned_allocator

Fri Dec 04, 2009 3:58 pm
With future c++ (e.g c++0x) versions it should not be required anymore.

Currently Eigen can do very little about it since its an STL issue of taking some elements by value where it were better to take them by reference.

I think currently you have three options to prevent using aligned_allocator:

1) define EIGEN_DONT_ALIGN
2) specialize std::vector for Matrix4d and force it to use aligned_allocator
3) compile your code in 64bit (at least for me it works on VC.net)

Regards,
Hauke
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: Eigen::aligned_allocator

Fri Dec 04, 2009 4:02 pm
Hauke wrote:3) compile your code in 64bit (at least for me it works on VC.net)


Win64 has 16 byte default alignment. But for example, Linux hasn't, even on x86-64.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]