[eigen] Eigen on an arm core |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Eigen on an arm core
- From: Daniel Stonier <d.stonier@xxxxxxxxx>
- Date: Sun, 9 Aug 2009 02:13:31 +0900
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=tahGqaJqoLwV9mrzm3poAMNWYbhi0CEr5I3tbR8WYwY=; b=MQ+70/3nFhtepW/8lGMzfMKnAEjBsHS1jrO1Wn7+dL8F5n8sR+cDtfOONGGomhDIw+ 248fB8aDrpw1JkeOiO3PMwMgvSLUiHK+nIGZue734B1ySUtXmdlheXYIRnc+FEz4rB+v rYN7HHPB372D8aazwjbrMxV029mRyCNq0UDvI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=gnDV2XJAOaBjL/dP/DHzfS7fead8aesqR2B78B1plx83HD6k0y5g2NlwobJsPUpUkc jBnr4Zvqif44Kdm/EmzqiYx25y3CsmCMXGUA6sO3pZeZO34ZnblkDgh6B13LmhZZuowQ oJ5IQDd6YWb6f/oNdvmFry2UJ2vKBV4Mf3jWo=
Hi,
We threw eigen at an arm core recently running a SLAM algorithm and
ignorantly discovered we were completely unknowing about alignment
issues!
I narrowed down our code to a simple example to hopefully highlight the issue:
************************************************************************************************
#include <iostream>
#include <vector>
#include <Eigen/Array>
#include <Eigen/Core>
using std::vector;
using Eigen::Vector2d;
using Eigen::Vector3d;
using Eigen::VectorXd;
class A {
public:
Vector2d v;
};
void f() {
A a;
double range = 3.0;
double bearing = 4.0;
a.v = Vector2d(range,bearing);
std::cout << a.v << std::endl;
}
int main() {
Vector3d v; // This is the spanner in the works, without this it runs fine.
f();
return 0;
}
************************************************************************************************
It then promptly drops out at the assert:
************************************************************************************************
Eigen/src/Core/MatrixStorage.h:44: Eigen::ei_matrix_array<T, Size,
MatrixOptions, Align>::ei_matrix_array() [with T = double, int Size =
2, int MatrixOptions = 2, bool Align = true]: Assertion
`(reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertion is
explained here:
http://eigen.tuxfamily.org/dox/UnalignedArrayAssert.html **** READ
THIS WEB PAGE !!! ****"' failed.
************************************************************************************************
I suspect...what we have is similar to the problem described for
windows on mingw -
http://eigen.tuxfamily.org/dox/WrongStackAlignment.html . I've been
reading that the ARM series has some different alignment rules. Now
I'm a bit dumbstruck about where to go with this or how to find out
more about it. Do you have any tips?
Regards,
Daniel Stonier (Yujin Robot).