Xref: utzoo comp.lang.fortran:786 comp.software-eng:633
Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!killer!tness7!tness1!sugar!ssd
From: ssd@sugar.UUCP (Scott Denham)
Newsgroups: comp.lang.fortran,comp.software-eng
Subject: Re: Fortran follies
Summary: Optimizations, vectorizations, arrays as dummy arguments
Message-ID: <2157@sugar.UUCP>
Date: 21 Jun 88 21:35:24 GMT
References: <5377@cup.portal.com> <2852@mmintl.UUCP> <1005@cresswell.quintus.UUCP> <701@garth.UUCP>
Organization: Sugar Land UNIX - Houston, TX
Lines: 25

In article <701@garth.UUCP>, smryan@garth.UUCP (Steven Ryan) writes:
> 
> Assuming all dummy arrays are assumed-size (largest dimension is *) breaks
> vectorisers and optimisers which need to know the array size. (This has to
> do with dependency analysis.)
> 

You make a good point. I have since learned that the most recent version
of IBM's vectorizing compiler makes what is probably the most reasonable
assumtion that can be made: a final dimension of 1 or * on a dummy array
are treated the same; for purposes of vectorization and optimization the
acutal dimension is assumed to be unknown. Any other value is assumed to
be correct. I suppose the rationale is that if the programmer went to the
trouble to put a dimension in there, it is probably meaningful. As it turns
out, this approach is useful for us, or would be if all vector compiler
vendors used the same logic. The only other way to guide the compiler in
making decisions is through the use of directives, and these have no 
standard form at all. Further, an estimate of size is much safer than a
binary VECTOR/NOVECTOR directive, since the boundary will differ on 
different architectures and possibly on different models within the 
same architecture. 
 
 Scott Denham 
  Western Geophysical
   Houston, TX