elemental function versus loop over function
- From: "Mark Morss" <mfmorss@xxxxxxx>
- Date: 28 Nov 2006 06:26:27 -0800
I have to perform a scalar function on each of the elements of a large
array. In general, for speed, does it matter much whether I loop over
the array or define an elemental function? One aspect of my problem is
that my array result depends not only on the input array, but on one or
two scalar inputs. So if I define an elemental function, before I can
call it with these arguments, my understanding is that I have to "blow
up" these scalars into constant-valued arrays of the same dimension as
my input array.
My preliminary assumption is that isn't worth doing this, and just
looping over the array is likely to be faster.
.
- Follow-Ups:
- Re: elemental function versus loop over function
- From: Richard Maine
- Re: elemental function versus loop over function
- From: Arjen Markus
- Re: elemental function versus loop over function
- From: highegg
- Re: elemental function versus loop over function
- Prev by Date: Re: rounding a number
- Next by Date: Re: elemental function versus loop over function
- Previous by thread: Fortran Error Problem
- Next by thread: Re: elemental function versus loop over function
- Index(es):
Relevant Pages
|