Re: [eigen] Attribute pure/const?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

I think such attributes might be useful if the code of the function is
not available when the function is called. Since Eigen is a pure
header library, I think the compiler always has access to this
information.

Moreover, such attributes might apply for double or int, but not for
some custom scalar types.

gael

On Mon, Mar 25, 2013 at 3:51 PM, Rhys Ulerich <rhys.ulerich@xxxxxxxxx> wrote:
> Hi all,
>
> Has anyone played with annotating the Eigen sources with pure and/or
> constant attributes to see if they provide a speedup?
>
> I ask because -Wsuggest-attribute=pure, etc. loves to suggest Eigen
> functions, and because
> http://stackoverflow.com/questions/2798188/pure-const-function-attributes-in-different-compilers
> indicates there's fairly wide compiler support for such annotations.
>
> Thanks,
> Rhys
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/