Re: [eigen] new tutorial on writing functions taking Eigen types as paramters |

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

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: Re: [eigen] new tutorial on writing functions taking Eigen types as paramters*From*: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>*Date*: Tue, 17 Aug 2010 17:37:22 +0200*Dkim-signature*: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=/K8j0s0jJofa2iPK5/gmk/9vpQiQzoZrMOFBklxkOxk=; b=HBzbkVdiPFGDv+RFrxxE6/4g/iI00zhbX1FslddbeKoGDn1huO3Wh7kroxK3ZZHD9Y SJEbSBGHNDMkScSW8ZkS6xAEoX1Qc5EERBh1rqoiUCc3FUTIl1fKrZAgCcEgLv89VunU 8JHZpUStFuLHzZ3dTbWM9sLHi+vaa9xF4xm4A=*Domainkey-signature*: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=QM5oZpWo+F82pe+wCtrUdYP1aJJv5WHdNM2iOqqpGzTo5QFMZWlx+GKfO5b5htcrJe GP38//ygaArkfhhC6d4tLkrOFTADH/aiFIbaFfAw0/AviazSGyG7j+Yo7Qyx+ejaF3Bc nRU1AeEyMLYDkRDhU91BFjsmc3dsxDoguWSVk=

Oh man - posted on the wrong thread. Sorry. - Hauke On Tue, Aug 17, 2010 at 5:23 PM, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx> wrote: > The failing test fail in 32 bit mode and it is related to the > alignment test of Map. It is so cryptic, that I don't get what is > going on. > > ei_assert(EIGEN_IMPLIES(ei_traits<Derived>::Flags&AlignedBit, > (size_t(m_data)&(sizeof(Scalar)*ei_packet_traits<Scalar>::size-1))==0) > && "data is not aligned"); > > How about a simple > > ei_assert(EIGEN_IMPLIES(ei_traits<Derived>::Flags&AlignedBit, > ((size_t)m_data % 16 ==0)) && "data is not aligned"); > > Just wondering? > > - Hauke > > On Tue, Aug 17, 2010 at 5:08 PM, Gael Guennebaud > <gael.guennebaud@xxxxxxxxx> wrote: >> On Tue, Aug 17, 2010 at 3:26 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote: >>> Note that since the only values that will ever be used are 1,2,Dynamic, we >>> could also make typedefs for them, so that in 99.9% of cases one wouldn't >>> need the template keyword. >> >> good point. Moreover, with the current cost model, it is enough to >> expose only the cases where N==1 and N==Dynamic. Even for the simplest >> expression 2*m, if N=2, then it gets evaluated. >> >> Of course, to be future proof it would still make sense to expose the >> N=2 case but others are really useless, so what about defining only >> the following three types (without the generic template one): >> >> typedef typename ei_nested<Derived,1>::type Nested; >> typedef typename ei_nested<Derived,2>::type NestedForTwoAccess; >> typedef typename ei_nested<Derived,Dynamic>::type NestedForMultipleAccess; >> >> >> alternative names: NestedOnce, NestedTwice, NestedManyTimes ??? >> >> gael >> >> >> >

**References**:**[eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Hauke Heibel

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Benoit Jacob

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Hauke Heibel

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Benoit Jacob

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Hauke Heibel

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Benoit Jacob

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Gael Guennebaud

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Hauke Heibel

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Gael Guennebaud

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Benoit Jacob

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Gael Guennebaud

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Benoit Jacob

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Gael Guennebaud

**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters***From:*Hauke Heibel

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters** - Next by Date:
**Re: [eigen] Do we need geometry refactoring?** - Previous by thread:
**Re: [eigen] new tutorial on writing functions taking Eigen types as paramters** - Next by thread:
**[eigen] [eigen3] .cwise() vs .array() and static assertion**

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