Re: [eigen] eigen sqrt compilation error

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


2009/6/19 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
>
> On Fri, Jun 19, 2009 at 12:29 PM, Patrick Mihelich
> <patrick.mihelich@xxxxxxxxx> wrote:
> >
> > On Fri, Jun 19, 2009 at 12:37 AM, Moritz Lenz <mlenz@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> >>
> >> Considering the number of times people make this error (forgetting to include it), what about including it by default? Is there a very good reason not to do it?
> >
> > I wonder this too. I ran into this error when I started using Eigen, and it seems to pop up regularly on the list. What exactly is the cost of including <Eigen/Array> in the core? How much does it increase compile times?
>
> on my high end computer with gcc 4.3.2 -O2 -DNDEBUG, much less time
> than to compile: Vector3f a, b; cout << a+b;, so something around 0.02
> sec.

On my computer I tried this program:

#include <Eigen/Core>
//#include <Eigen/Array>

using namespace Eigen;

int main() {
  Matrix3d m = Matrix3d::Identity();
  Matrix3d n = m+m;
  Vector3d v; v << 1, 2, 3;
  Vector3d w = v+v;
  w = m * w;
  std::cout << w << std::endl;
}

with g++ 4.3.3. I repeated the compilation 10 times.

The #include<Eigen/Array> increases compilation times by 2.5% and the
memory usage is not affected.

I'm OK to consider this reasonable, especially as other modules like
Geometry already include Array.
What's your opinion?

The next question would be: should we merge the Array/ files into
Core/ or just #include<Array> in Core.

Benoit



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/