mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-04 01:34:07 +08:00
actually this message is probably more effective at making people read the web page...
This commit is contained in:
parent
08e6b7ad80
commit
6700f07fb0
@ -41,12 +41,7 @@ template <typename T, int Size, bool Align> struct ei_aligned_array
|
|||||||
ei_aligned_array()
|
ei_aligned_array()
|
||||||
{
|
{
|
||||||
ei_assert(reinterpret_cast<unsigned int>(array)%16 == 0
|
ei_assert(reinterpret_cast<unsigned int>(array)%16 == 0
|
||||||
&& "An array that should have been aligned was allocated at a non-aligned location! "
|
&& "this assertion is explained here: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html **** READ THIS WEB PAGE !!! ****");
|
||||||
"Basically, if a struct Foo has a member that's a fixed-size vectorizable Eigen object (like "
|
|
||||||
"a Eigen::Vector2d) and you dynamically allocate objects of struct Foo, then you need to "
|
|
||||||
"let struct Foo have an aligned operator new, which you can do like this: "
|
|
||||||
"struct Foo : Eigen::WithAlignedOperatorNew {... "
|
|
||||||
"See this page for details: http://eigen.tuxfamily.org/api/UnalignedArrayAssert.html");
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user