Subject: hpff-interpret: Array Sections and HPF_LOCAL

From: Dave Watson <[email-masked]>
Date: Tue, 20 Feb 1996 19:04:20 +0000 (GMT)

---------------------------------------------------------------------------
[email-masked] is a mailing list for corrections,
clarifications, and interpretations related to High Performance Fortran.
Instructions for adding or deleting yourself from this list appear at the
bottom of this message.
---------------------------------------------------------------------------

Can I add support for interpretation a) i.e.

            -------------------------------------
           | dummy(1:2, 1:2)  |  dummy(1:2, 1:0) |
            -------------------------------------
           | dummy(1:0, 1:2)  |  dummy(1:0, 1:0) |
            -------------------------------------

If we consider a function or subroutine delivering a result sized according
to an incoming argument this interpretation is necessary for correct behaviour.
The following (exceedingly artificial) code illustrates the necessity

         program prog
           interface
             extrinsic(hpf_local) function funres(dummy)
               integer :: dummy(:, :)
               integer :: funres(size(dummy,1))
   !hpf$       inherit dummy
   !hpf$       align with dummy(:,*) :: funres
             end subroutine funres
           end interface
           integer actual(4, 4)
           integer junk(4)
   !hpf$   processors p(2, 2)
   !hpf$   distribute actual(block, block) onto p
   !hpf$   align junk(:) with actual(:,*)

           junk(1:2) = funres(actual(1:2,1:2))
         end program prog

         extrinsic(hpf_local) function funres(dummy)
               integer :: dummy(:, :)
               integer :: funres(size(dummy,1))
   !hpf$       inherit dummy
   !hpf$       align with dummy(:,*) :: funres
               funres = 0               
               dummy  = 0
         end subroutine funres

under interpretation b) processor 2 (assuming the numbering in the original 
example) would return a size zero array into a size 2 array. 

Cheers,
   Dave

---------------------------------------------------------------------------
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>
---------------------------------------------------------------------------