Subject: hpff-doc: Comments on Data-Parallel

From: <[email-masked]> (Henry Zongaro)
Date: Wed, 2 Oct 1996 14:31:49 -0400 (EDT)

---------------------------------------------------------------------------
[email-masked] is a mailing list for HPF 2.0 language specification
authors and editors.  Instructions for adding or deleting yourself from this
list appear at the bottom of this message.
---------------------------------------------------------------------------
Hi Rob,

     I have a couple of comments on Section 4 of the most recent draft of the
HPF 2.0 specification:

       In the third constraint after H404, the POINTER attribute is not
       among the list of attributes proscribed for a NEW variable, although
       there was such a restriction in HPF 1.1.  I assume that we consciously
       decided to relax the restriction in HPF 2.0.  However, what does it
       mean?  Section 4.1.2 speaks in terms of the values of NEW variables, but
       never their association status.

       For example, is the following permitted?

             program p
               integer, pointer :: ptr

               allocate(ptr)
       !hpf$   independent, new(ptr)
               do i = 1, 2
                 ptr = 1
               end do
             end program p

       If a pointer is permitted to appear in the NEW clause, presumably you
       want its newness to apply both to its value and its association status.
       That is, both the value and association status are as if they are
       undefined on entry to and exit from the loop.

       The same comment holds for ALLOCATABLE arrays, but there it's a little
       more confusing because you can't simply say that the array will acquire
       an undefined allocation status; in Fortran 95, allocatable arrays
       always have an allocation status of either currently allocated or
       not currently allocated.  In Fortran 90 an allocatable array could have
       undefined allocation status, but then you couldn't do anything with the
       array - neither allocate, nor deallocate it.

             program p
               integer, allocatable :: arr(:)

               allocate(arr(2))
       !hpf$   independent, new(arr)
               do i = 1, 2
                 arr = i
               end do
             end program p

       Should every iteration of the loop receive a new copy of arr that is
       allocated?  Is any iteration permitted to deallocate arr?

       I guess this comment on ALLOCATABLE arrays may be more appropriate as an
       interpretation question.

Thanks,

Henry
---------------------------------------------------------------------------
To (un)subscribe to this list, send mail to [email-masked].
Leave the subject line blank, and in the body put the line
(un)subscribe <email-address>
---------------------------------------------------------------------------