(j3.2006) Public Comment J32035

Aleksandar Donev donev1
Tue Jul 15 19:23:21 EDT 2008


On Tuesday 15 July 2008 15:14, Jim Giles wrote:

> I think all of what you want would be better accomodated by
> allowing so-called "assumed rank arrays".
I proposed this for F2008 [it was called DIMENSION()], and it got rejected :-\

> In the example case: 
>
> ? ?function accumulate(a,s)
> ? ? ? real :: a(..), s
> ? ? ? real :: accumulate(shape(a))
> ? ? ? ...
> ? ?end function accumulate
>
> (I leave out the code since the declarations are the part of interest.)
> Here, the second argument is *required* to be a scalar
I also proposed this (I believe I proposed some kind of attribute for the 
dummy, like SCALAR, but even I forgot). Again, it got rejected. It may have 
even been what inspired Malcolm to propose IMPURE, if my memory serves me 
right. BTW, Van has even proposed your specific syntax "accumulate(shape(a))" 
[and I supported it very much], but again, it got rejected.

Anyway, IMPURE did get accepted. It is not perfect nor as good as the above. 
But it helps ELEMENTAL become more useful (albeit not fully functional).

> The "assumed rank" alternative would be both more legible and more
> flexible. ?And, I think they're likely to be more implementable. ?The
> existing compilers probably have a lot of assumptions about elementals
> that would be violated and cause major rewrites to permit impurity.
I am not a vendor but cannot see how this could be true.

That said, Bill will propose assumed-rank arrays as part of the interop TR, 
paper is fortcoming...Not F2008 (too late)!

Best,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ Lawrence Livermore National Laboratory
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev




More information about the J3 mailing list