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

Can't create ten Quaternionf objects;

Tags: None
(comma "," separated)
redheru
Registered Member
Posts
2
Karma
0
OS
I tried to create ten Quaternionf objects, but failed.

I run the code on Win7 X64 and VS2008.

Code: Select all

#include <iostream>
#include <Eigen/Dense>
using namespace Eigen;

void main()
{
  Quaternionf *q = new Quaternionf[10];

  MatrixXd m(2,2);
  m(0,0) = 3;
  m(1,0) = 2.5;
  m(0,1) = -1;
  m(1,1) = m(1,0) + m(0,1);
  std::cout << m << std::endl;
}


Output is
Assertion failed: (reinterpret_cast<size_t>(array) & 0xf) == 0 && "this assertio
n is explained here: " "http://eigen.tuxfamily.org/dox-devel/TopicUnalignedArray
Assert.html" " **** READ THIS WEB PAGE !!! ****", file e:\lib\eigen-eigen-3.0.3\
eigen\src\core\densestorage.h, line 69


I checked http://eigen.tuxfamily.org/dox/TopicUna ... ssert.html
But I can't understand.

plese help me, if you have idea.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
can you check your version of Eigen? if it's not the recent 3.0.4 please give it a try first.
redheru
Registered Member
Posts
2
Karma
0
OS
Thanks!
The program works correctly under the Eigen 3.0.4

But, following warnings out when compiled.

1>e:\lib\eigen-eigen-3.0.4\eigen\src\geometry\quaternion.h(284) : warning C4305: 'specialization' : truncation from '' to 'const bool'
1> e:\lib\eigen-eigen-3.0.4\eigen\src\geometry\quaternion.h(284) : while compiling class template member function 'void *Eigen::Quaternion<_Scalar>::operator new(size_t)'
1> with
1> [
1> _Scalar=float
1> ]
1> e:\home\program\googlecode2\eigentest\eigentest\main.cpp(9) : see reference to class template instantiation 'Eigen::Quaternion<_Scalar>' being compiled
1> with
1> [
1> _Scalar=float
1> ]
1>e:\lib\eigen-eigen-3.0.4\eigen\src\geometry\quaternion.h(284) : warning C4305: 'specialization' : truncation from '' to 'const bool'
1> e:\lib\eigen-eigen-3.0.4\eigen\src\geometry\quaternion.h(284) : while compiling class template member function 'void Eigen::Quaternion<_Scalar>::operator delete(void *) throw()'
1> with
1> [
1> _Scalar=float
1> ]


Do you have any ideas?


Bookmarks



Who is online

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