Re: [eigen] two things |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] two things*From*: "Gael Guennebaud" <gael.guennebaud@xxxxxxxxx>*Date*: Wed, 25 Jun 2008 22:09:17 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=KUEnD4TJ79BrnSacNIivjcuObanghnaLDBTJ9q7WA7s=; b=c7Yo2Y9NC3Gg6zYnf8skXOwNSTMjG34YbCfLeTVsVQ3CQLmgEFXeJ5T42SEfCf2bcD nrL4ZrlcGwhgAlwlGsIBFIPx1uvPxmoDAn0kfR31imfbw3anIT7wXO7/QrSGJ/PQbKtc gJWlSrlKb/IC7ENm/il2yXIU8Y8rV3frHgDKw=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hnq2TU6NfdNeJZ498JEqP+de1pLScc7P8SEOIQPLTVd+213E0TT0lYywwgS5AoePC1 v3A+VpNjK7XaGhMb0DrsKBreN2pLuK8z4l3vj1zNWEs+w5FGG0Tt4Xz/xRa68BFqtw6d yC297FjlTlql4e+v4nnAVSe9ztqTOhLnSe+x0=

Hi, On Wed, Jun 25, 2008 at 9:23 PM, Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote: > Hi, > > 1) we had a debate about introducing a separate Vector class recently, but > since then I realized that it would increase the number of instantiations as > Vector<n> and Matrix<n,1> would be considered as two separate types. Hence > having vector currently implemented as a special case of matrix, is in fact > an optimization. I'm tempted to say that this outweighs the scariness of > Matrix constructors, hence we can bury the idea of Vector class. ok? right, an intermediate solution would be to specialize Matrix<> if one of the dim is 1, e.g. let's add an additional "hidden" template parameter: template <typename T, int R, int C, ..., int IsVector = R==1 || C==1> class Matrix {....}; template <typename T, int R, int C, ..., int Flags> class Matrix<T,R,C, ..., MaxSize,1,Flags,true> { /* vector */ }; but this only allows to improve a bit the constructors and this does not offer any template Vector<> class, so I'm not sure it's worth it, just an idea.... > 2) about linear vectorization: i remember you suggested adding a packet(int) > method. I think this is still a good idea and would still improve linear > vectorization despite the improvements you already made. OK? actually I'm not sure that's worth it: I've done some bench and if I remember well the overhead between a MatrixXf(R,C); versus a VectorXf(R*C); was negligible, like x1.1 or x1.2..... gael.

**Follow-Ups**:**Re: [eigen] two things***From:*Benoît Jacob

**References**:**[eigen] two things***From:*Benoît Jacob

**Messages sorted by:**[ date | thread ]- Prev by Date:
**[eigen] two things** - Next by Date:
**Re: [eigen] two things** - Previous by thread:
**[eigen] two things** - Next by thread:
**Re: [eigen] two things**

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