[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] nesting
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 5 Feb 2010 22:46:03 +0100
- 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 :from:date:message-id:subject:to:content-type; bh=uuoOsOthhix0OFHdZA7keZu7RIbnxs9eLOdVNTi94YY=; b=gDn0ZvqY55hjrNp8D01GKMzwnO6ILFzw8om51JTHVwJZq/HviBdcYJipqAKLuTpGtB NbysKcyqX/jwSQZYomF2vpib/S1rl+Yh2L2aDutboLCQ8QJCgILmjd4zKVH2nwrkH+ew lEhATYdgG96XVc9ascz8FXQ9Hq815wIObKvK4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Um4NQDrUw8BXlXu0eIbrG5+RxtILJJn4UpsD7+DSp6uABZOpnRHBGMVHsGNxTbZGGB kc/WRO3PwzenEaHv6H9tFdoW3vgEBMgLwHPpZBv5vR4t7WV3Ubt1vMkxFlZwBs5JQfF8 EBJYZN0gWjCb+lZZSKXosbXsogy7kt7DaHiXk=
On Fri, Feb 5, 2010 at 8:47 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> On Fri, Feb 5, 2010 at 10:22 AM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> So unless someone see how to solve this latter issue, what Hauke is trying
>> to do could work. But instead of specialzing ei_ref_selector for all
>> expressions I would suggest a different approach using new bit Flags. The
>> rules would be as follow:
>> - if the expr has the NestByReference flag, then nest by reference,
>> otherwise nest by value
>> - by default, only Matrix and Array would have the NestByReference flag
>> - the NestByReference flag is not inherited
>> - an expression nesting a temporary would have the NestParentByReference
>> flag
>> - the NestParentByReference flag is not inherited, but if one of the
>> children of an expression has the NestParentByReference flag, then the
>> current expression will have the NestByReference flag. If we make sure that
>> NestParentByReferenceBit == NestByReference>>1, then we simply have to do:
>> Flags = ... | ((Lhs::Flags|Rhs::Flags)&NestParentByReference) << 1), or we
>> could also use a macro: Flags = ... |
>> EIGEN_PROPAGATE_NESTING_BIT(Lhs::Flags|Rhs::Flags).
>
> Just wanted to let you know that in case you decide to do this, I
> volunteer to code it.
great! I'm tempted to say go ahead for it as I cannot see any simpler solution.
> - Hauke
>
>
>