Re: [eigen] eigen sqrt compilation error |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] eigen sqrt compilation error*From*: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>*Date*: Fri, 19 Jun 2009 15:08:41 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=w9QGJBrApuKSJfMnHkG9TxYywORSGJV8vhCzuywy8TY=; b=UrUGOkmjU695MvUdPbt6x7l2MGY+UCKGEb4GNrxCjJ3JiBAFOU+NHBTeMKwvljifZo EIxSwssHGHYrBG67fLKD4Gz7h8HhQceu1GsliCtioEcWX+Ht3fdP3bnkejoI8/lxhSXq GXcBj4lhjzbjn1O86dalP9JOOTk4bPBrKKJzQ=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=u9/rYf2i75DS6hbR+ZOMGnXfAgn4nGrwfYOtbtNv9pDlz3WeG54lphRN3pYVX9gH1K K92ILk+D/2a25sR+ykC1KHoQTjRDSzCkcbWE8MYY8NHPWlRop268i2mvtpw0JIOJ0yiM bKblL4wfKPXiazfxdZTLpRlD05cK05B2rHiCs=

I'm ok with that big Eigen header. btw, using such a big header with precompiled header generates a 28MB binary, and it speeds up the compilation of your example by a factor 2: everytime a file in eigen change: g++ -O2 -DNDEBUG -x c++-header path_to_eigen2/Eigen/Eigen g++ -O2 -DNDEBUG example.cpp -I. -Ipath_to_eigen2/ where example.cpp starts with: #include <Eigen/Eigen> gael On Fri, Jun 19, 2009 at 2:53 PM, Benoit Jacob<jacob.benoit.1@xxxxxxxxx> wrote: > oh and there is another "nuclear option": > > add a convenience #include<Eigen/Eigen> that includes them all. And > then keep the separate headers for the users who want every % of > compilation speed. > > The idea is that Core and Array are the 2 biggest modules, so > Eigen/Eigen won't be much slower than including them two. > > Benoit > > 2009/6/19 Benoit Jacob <jacob.benoit.1@xxxxxxxxx> >> >> 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 > > >

**References**:**[eigen] eigen sqrt compilation error***From:*Rohit Garg

**Re: [eigen] eigen sqrt compilation error***From:*Gael Guennebaud

**Re: [eigen] eigen sqrt compilation error***From:*Moritz Lenz

**Re: [eigen] eigen sqrt compilation error***From:*Patrick Mihelich

**Re: [eigen] eigen sqrt compilation error***From:*Gael Guennebaud

**Re: [eigen] eigen sqrt compilation error***From:*Benoit Jacob

**Re: [eigen] eigen sqrt compilation error***From:*Benoit Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] eigen sqrt compilation error** - Next by Date:
**Re: [eigen] eigen sqrt compilation error** - Previous by thread:
**Re: [eigen] eigen sqrt compilation error** - Next by thread:
**Re: [eigen] eigen sqrt compilation error**

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