On Wed, May 15, 2013 at 11:36:46AM -0400, Jordi GutiƩrrez Hermoso wrote:
<snip>
Any objection to completely removing all of the inplace logic from C++?
What is if the lhs operand (m-code) contains, e.g., indexing
operations? E.g.
a(id1, id2, id3) += b;
against
a(id1, id2, id3) = a(id1, id2, id3) + b;
or even
c{id4, id5, id6}(id1, id2, id3) += b;
against
c{id4, id5, id6}(id1, id2, id3) = c{id4, id5, id6}(id1, id2, id3) + b;
or even more complicated?
Have you checked whether Octaves do_inplace code you speak of is able
to spare the double evaluation of the index operation? If it is, this
would be surely more than an optimizing compiler could achieve,
wouldn't it?