[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: move constructors likely a requirement
From: |
kingcrimson |
Subject: |
Re: move constructors likely a requirement |
Date: |
Fri, 6 Sep 2019 08:36:17 +0200 |
> Il giorno 5 set 2019, alle ore 20:20, Carlo de Falco <address@hidden> ha
> scritto:
>
>
>
> Il 05 set 2019 20:10, Carlo de Falco <address@hidden> ha scritto:
>
>
> Il gio 5 set 2019, 19:55 John W. Eaton <address@hidden> ha scritto:
> On 9/5/19 12:35 PM, Carlo De Falco wrote:
>
>
>
> I'm surprised those are the only warnings, and that there is a warning
> on line 122 but not also for line 107 in the same function.
>
> My guess is that it is due to the NoAlias wrapper which is applied to
> variable r being returned on line 122 but not on line 107.
>
> I suppose returning a derived type prevents the compiler from applying
> optimization.
>
>
> jwe
>
> c.
>
>
> Here is the definition of the NoAlias template class :
>
> https://hg.savannah.gnu.org/hgweb/octave/file/d171d356767b/liboctave/array/Array.h#l886
>
> c.
For the case of the warning on line 122 of tril.cc,
I don't really see the point in using NoAlias as the elements of the
Array r are accessed through the fortran_vec () pointer anyway so
the call operator for r is never actually used.
My suggestion would be to just remove NoAlias then ...
changeset attached.
c.
open_spTJFglc.txt
Description: Text document
- Re: performance improvements, (continued)
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/04
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/04
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement, Carlo de Falco, 2019/09/05
- Re: move constructors likely a requirement, Carlo de Falco, 2019/09/05
- Re: move constructors likely a requirement,
kingcrimson <=
- Re: move constructors likely a requirement, kingcrimson, 2019/09/06
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/06
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, John W. Eaton, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05
- Re: move constructors likely a requirement, Carlo De Falco, 2019/09/05