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

Cannot make aligned allocation

Tags: None
(comma "," separated)
SAnton
Registered Member
Posts
16
Karma
0

Cannot make aligned allocation

Mon Aug 22, 2011 11:40 pm
I have

Code: Select all
typedef Eigen::Matrix<double, 2, 1> Point;
typedef Eigen::Matrix<double, 1, 1> Data;
typedef std::pair<Point, Data> DataPoint;
typedef std::vector<DataPoint> DataPoints;

DataPoints points;


I getting this error on points.push_back():

Code: Select all
Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****", file c:\eigen\src\core\densestorage.h, line 69


I have read the web page, but cannot figure out how to use advices listed there.

I tried to specify aligned allocator for the vector, but getting this compile error:
Code: Select all
Error   1   error C2719: '_Val': formal parameter with __declspec(align('16')) won't be aligned   c:\program files\microsoft visual studio 10.0\vc\include\vector   870


Please help.
SAnton
Registered Member
Posts
16
Karma
0
Sorry, I found solution. I added allocator to all my vectors (not only the mentioned one). And error disappeared.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]