Re: ELEMENTAL functions and performance
- From: rusi_pathan <tabrezali@xxxxxxxxx>
- Date: Tue, 29 Jul 2008 21:24:53 -0700 (PDT)
On Jul 29, 12:57 pm, deltaquattro <deltaquat...@xxxxxxxxx> wrote:
Hi,
I would like to know if the attribute ELEMENTAL for a function/
subroutine can negatively affect performance or not.
I am going to code a lot of small functions, for things like Jacobi
polynomial evalution, Gauss point generation, etc. etc., to be used in
a "huge" code. I would like the functions to work for scalar as well
as for rank-1 array input/output. I'd prefer to write them as
ELEMENTAL, rather than forcing the user to read/write a scalar into a
rank-1 array of size 1 each time he has to use the subroutine for
scalars.
However, sometimes I heard that some "new" features of the language
may have an hit on performance, because they make optimization more
difficult for the compiler. I don't know if this is the case with
ELEMENTAL, however these functions will be called a lot of times, so
it's not a good idea if they are slow. The code will run on parallel
vectorial supercomputers. According to these informations, what would
you suggest me to do?
Thanks,
Best Regards,
deltaquattro
I think one the purpose of having elemental functions was that
compilers can optimize it better (for example by auto-parallelization
when used on whole arrays). What they actually do in practice is a
different matter alltogether.
.
- Prev by Date: Re: OT -- Re: Trust an Aussie to cut through the bull***
- Next by Date: Re: ELEMENTAL functions and performance
- Previous by thread: Software Package Free! ... about our Free Software
- Next by thread: Re: ELEMENTAL functions and performance
- Index(es):