|Re: [eigen] Special topic page on Aliasing|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Special topic page on Aliasing
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 4 Aug 2010 09:46:46 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.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=F0wLN7L2NvnOnxW7eRIeSLzsMxdaOsaXTUd7WIPB6zw=; b=iGAJjaXWdOW4sReMcyxKFpeZaJlXwoOduExXcnkBB+SKbeDQxUxv03FQ6I2ADbJujd sQ0qB8r648ngQPbOw4bBnfT/m9NZ9JpJl+x8YkO7BeJBxelzqj6+oTtJqy4mN27QnZkr XvKuCB4bZTr9iNKlKEBOsMTok+PXlLRdAm+pk=
- 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=mifyjLejPdKB1meL3sTHGFPhV621Z17/1MAzLSKe1HBYTfG0wb/Rw5iUX8rhFX3I5z PNNo95Dy8Y6j19CfECiQ7U9PYr6EiSOaSWcM+fCCRR5V+eaEyHo0c2CffUffw1iko8j/ o6bo6/Ql+Ro5uS/QhrbCGprF+6aBz8cHd5o90=
2010/8/4 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> 2010/8/1 Jitse Niesen <jitse@xxxxxxxxxxxxxxxxx>:
>> I started a special topic page on Aliasing; you can see the start at
>> My idea is to explain aliasing from a user's perspective, and mention as
>> little about the internals of Eigen as possible.
>> However, I'm now wondering whether we need this page. There is quite a bit
>> of overlap with the page "Lazy Evaluation and Aliasing" at
>> In my mind the main topic of that page is lazy evaluation. Perhaps the need
>> to learn about lazy evaluation is a bit less immediate for the user (that's
>> why I very immodestly bumbed 'my' aliasing page to the above the lazy
>> evaluation page in the Overview page).
>> I think that the pages are sufficiently different that it's useful to have
>> both, but I want to give others a chance to comment first before I do more
>> work on the aliasing page.
> Sorry for the long delay replying. Thanks for starting this page. As I
> already mentioned, I think it's good to have many special-topics pages
> and it's OK to have some redundancy between them. So a page on
> aliasing is very welcome alongside a page on lazy evaluation.
> I have a few comments about the content. The example a=a.transpose()
> is a bit special as we do catch it with an assertion in Eigen. So it's
> not really dangerous (not any more than any other illegal op) it's
> just illegal.
> It's still good to use that as your first example of assignment
> exposing aliasing issues at the top. But below, instead of the
> dichotomy safe/dangerous, I would rather distinguish 4 cases:
> - totally safe operations (e.g. coeff-wise ops)
In the above line, replace 'totally' by 'inherently'.
> - operations that are safe because Eigen is taking care of
> introducing a temporary (e.g. m = m*m).
> - operations that are illegal, and that Eigen catches (e.g. m = m.transpose())
> - operations that are dangerous (silently give wrong result) -
> explain that this is the "generic case" and give an example e.g.
> m.row(i) = m.col(j) for suitable i,j.
> Thanks again for getting this rolling.