On Mon, 22 Mar 2004, Richard Maine wrote:
> > PS: i know, i can use assumed-shape array, but i want to use adjustable
> > bounds, because i need to redimension my arrays at different points.
>
> I'm not sure exactly how that follows, but I guess that's up to you.
> Be aware that by using anything other than assumed shape (or pointer)
> dummies, you are asking for several problems. One is that, as you
> noticed, error checking may be degraded. Another is that you may find
> that the compiler makes temporary copies of your arrays, which can be
> a performance killer; compilers have gotten better about not making copies
> needlessly, but in some cases they don't really have an option.
i agree that error checking will go downhill, but i'm not very sure that
performance will take a hit (if i'm careful)... after all a lot of times
f77 codes perform better than f90 codes and they used (and still do) to
use adjustable/assumed-size arrays.
the reason for why i want to use adjustable dummy arrays, is that i want
to use a global array as a storage array and want to use it in different
contexts with different dimensions ( for eg, in one case (nx,ny/3,nz) and
in another case as (nx,ny,nz/3) ). as the global array is an
allocatable/pointer array, i can't use equivalence.
thanks for both your answers for my earlier question, malcolm and
richard.
renchi
|