[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] nesting
- From: Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>
- Date: Sat, 6 Feb 2010 12:29:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=4757bq9o96SlT+xX4tN1fvgl5kg1X6EnBG1BcwJxl3Y=; b=jtciyYN8pkl7ZTxYKEDNh0Hw3PVw7Koyttr+KpmA/S8eZH2BdU4Hc2VPO9MthUTf3I 2oB66d0D0FwogPThKmb1Z38qGn/iHmdu8wF+KtwfIl0setndMlVkRshkaJ8f46CLEtSU 6bzW9DUofswAEuscpxWGhDRhomiZr8RrTZlZc=
- 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; b=MrynVcTHJCofSabb4f0klFn4Y8yusyuO28svQ4MoDo52VA0ucG42jWREG2N2QeCFNg cxDFsRJpVYEUZub9CFE7FtNzM1QGbPsAnrUrM17slor3dwvFrlhR+qmLhPcu0Py/CtAG cun9GW4URjYsTEbHQBb2HLlL6sTLHSZx6h5IE=
Ok, answering myself. Here it was probably easier to inherit all flags
and switch only to storage order one.
On Sat, Feb 6, 2010 at 12:14 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> Ok, I am on it. I stumbled over something where I am not sure how to handle it.
>
> In e.g. ei_traits< Transpose<...> > we (or you) do:
>
> Flags = (int(_MatrixTypeNested::Flags) ^ RowMajorBit),
>
> I expected this to be:
>
> Flags = (_MatrixTypeNested::Flags & HereditaryBits) ^ RowMajorBit
>
> am I wrong or right?
>
> - Hauke
>
> p.s.: I found this useful to recall...
>
> |: set bit(s)
> &: check bit(s) or copy bit(s)
> ^: toggle bit(s)
> ~: clear bit(s)
>
> On Fri, Feb 5, 2010 at 10:46 PM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> 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
>>>
>>>
>>>
>>
>>
>>
>