Re: [eigen] Lazy evaluation bug, feature, or PEBKAC? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Thu, 3 Mar 2011 09:21:30 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=EjjTVKWS2PuPYZwdtU/OfJPgpWsFe86YM0TUL+YJRZU=; b=Ye7ucN2Lv0WOuFXB2HyHKzJXE819Urr53xVzkoEF3pGqwSrxvZsb+YcbaCneRfcMr0 0SWeYX1v4/dSB+H3mtQlLdvjRkBptvUzfz/siawDOm4cmK3wkd1HxiQfvvJ1HtBgfns5 +JFHXKvSbjGlEXi15csGpySvTsg/1wog6HS1Q=
- 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=pgF/I4zZNZcBDiy3Vz2KnXFOJWmyQ4xkzJcAGZNYCnmEFS1DfiI5TRSS1F4011RtTR x6r2ZzXB9jgU3uRRIGFATqScNOjRbBkhjNkoDFF9+nLn75GLt5TFAFHwexwchdoRwOA6 yF3pzz7glgCsRgPl/4ZTD61d0998feP6pCT+M=
2011/3/3 Eamon Nerbonne <eamon@xxxxxxxxxxxx>:
> Hi all,
>
> C++0x is going to happen, and this particular bug (even if user caused) will
> be easier to make since auto is so attractive for templated types one (as a
> programmer) doesn't well understand. Despite the low runtime cost, there
> still is a motivation to do this just to simplify complicated expressions
> without binding expression decomposition to expression evalutation strategy
> (probably not common, but I could see myself doing this). If I understand
> correctly, without explicit eval, this will work in eigen3 - right? And
> with explicit eval, even doing "const auto &" won't be enough?
That's my current understanding too. I wouldn't worry too much about
it. Once the expression evaluator is implemented
(http://eigen.tuxfamily.org/bz/show_bug.cgi?id=99), expression objects
will never ever have to store temporaries by reference, so AFAIU
there will be no problem. I don't know if there will still be crashes
if the user explicitly calls eval(), but that would not be our fault
--- if the user explicitly creates temporaries with eval(), it's his
responsibility to understand their lifetime.
Benoit
- References:
- [eigen] Lazy evaluation bug, feature, or PEBKAC?
- Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?
- Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?
- Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?
- Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?
- Re: [eigen] Lazy evaluation bug, feature, or PEBKAC?