Hi,
> A full description of the Compaq solution, by Stan Whitlock, appears in
the
> current, December 2000, issue of ACM Fortran Forum,.
I was just thinking about this problem this morning and I do not have this
copy of ACM with me, so I may ask something that is in the paper (what is
the full name of the paper?).
We talked about a KIND keyword to some intrinsics such as LBOUND, SIZE,
MAXLOC, COUNT, etc. But really more than that is needed. For example, in a
statement
A=3.0
where A is a very large array, the compiler needs to generate its own loop
temporary and needs to decide on its kind. I was thinking that the compiler
could use the kind of the lower and upper-bounds used in the DIMENSION
declaration of the array to decide this. For example,
REAL, ALLOCATABLE, DIMENSION( 1_i_dp : ) :: A
would imply that all compiler-generated integers used to address A will be
of kind i_dp. This is mostly an advice of course. Am I in the right
direction?
This reminded me of another question I meant to ask. Is there any plans to
include some statements in the standard that would provide helpful
*optimization* hints to the compiler. For example, for allocatable arrays
the compiler could use information on how large the array is for
compiler-generated loop optimizations. For example,
REAL, ALLOCATABLE, DIMENSION( 1_i_dp : ~1000) :: A
would advise the compiler that A can be treated by the optimizer as if it
were of extent 1000. Or, often (especially in HPF) it is helpful to indicate
that two allocatable arrays will have the same extend along a dimension (be
conformable along it). And, my example with the permuatations A(I)=B and
A=B(I) would benefit from knowing I was one-to-one. Am I completely off
track with these suggestions?
Thanks,
Aleksandar
_____________________________________________
Aleksandar Donev
http://www.pa.msu.edu/~donev/
[log in to unmask]
(517) 432-6770
Department of Physics and Astronomy
Michigan State University
East Lansing, MI 48824-1116
_____________________________________________
|