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: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 19 Jun 2009 19:15:26 +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=GyExrg6ekz8chJzC6+jrRDEmHxOQEE9RCbgWBzf88Lc=; b=UxgFYP0JUNG1UXdRv7Dnexdrm4Mfh3IHvDKRchtiddGztOZ+674Kkx4s/Khecm/xCz UyXBiYLVNGpFUyUJfiCmJCK3KniXvyws9ZAUqn7uY1QE3NSK3pEGMMd7bl19rlTyhBxO uImmvlbkZlSQqpKVRBEFr6CZ5iJZRm55WCEcg=
- 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=e+0Hi9B81IUIwKj/x8H6cx6OaerBB0lQltMnf4eUsK9rt6jCO520ulI4meq6j5U/va kF8+UdIYhMf2tJqXtYyVd1DFlByYeJoC/R5Hjao1Mfo63L+eOmuxQgfFxvSsEgC3aupx DhE7EkJBqoUHH4nKePszOwS1yzh5Do/ytNGv0=
Finally, I added a Eigen/Dense header, including all the dense
functionality, but not Sparse, and not the workaround files
QtAlignedMalloc, StdVector.
Rationale:
- this is only 15% slower than Core on my test, while it becomes 35%
slower than Core if I also include Sparse.
- we can still offer Eigen/Eigen alongside if you still think it's
needed. It would include Dense and Sparse, but still not the
workaround files. For that reason it's a bit misleading : the name
Eigen/Eigen suggests that all is included. Tell us if you still want
Eigen/Eigen.
Benoit
2009/6/19 Rohit Garg <rpg.314@xxxxxxxxx>
>
> PLEASE include the nuclear option. I like that.
>
> On Fri, Jun 19, 2009 at 6:13 AM, Mark Borgerding<mark@xxxxxxxxxxxxxx> wrote:
> > I like this.
> > * easy to get everything from Eigen you could possibly want with one include
> > * possible to go through the trouble of minimizing compile time or source
> > file dependencies.
> > It seems like a good philosophy.
> >
> > Guido Von Rossum is fond of saying "Make the easy things easy. Make the hard
> > things possible."
> > -- Mark
> >
> >
> > Benoit Jacob 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
> >>>
> >>
> >>
> >>
> >
> >
> >
> >
>
>
>
> --
> Rohit Garg
>
> http://rpg-314.blogspot.com/
>
> Senior Undergraduate
> Department of Physics
> Indian Institute of Technology
> Bombay
>
>