
! ***** This is level 1 program *****

! This program requires shift communication 

      PROGRAM MAIN 
      REAL X(-18:243), Y(-10:455) 
!HPF$ PROCESSORS P(2) 
!HPF$ TEMPLATE TX(-86:1021),TY(-23:973) 
!HPF$ DISTRIBUTE TX(CYCLIC) ONTO P 
!HPF$ DISTRIBUTE TY(CYCLIC) ONTO P 
!HPF$ ALIGN X(i) WITH TX(4*i-6) 
!HPF$ ALIGN Y(i) WITH TY(2*i+0) 

      FORALL (i=-18:243) X(i) = 0 
      FORALL (i=-10:455) Y(i) = i 
      FORALL (i=9:213:2) X(i) = Y(2*i+3) + Y(2*i+1) 

      PRINT 111, (X(i),i=-18,243) 
111   FORMAT(1x,f17.2) 
      END 
!  The parameters in order: 
!  p,lx,ly,ux,uy,l,u,s,d1,d2,ax,ay,a1,a2,ltx,utx,lty,uty,bx,by,b1,b2 
!  2 -18 -10 243 455 9 213 2 2 2 4 2 2 2 -86 1021 -23 973 -6 0 3 1 


!  Some selected output values for X(i)=9,213,10:
!      40    80   120   160   200   240   280   320   360   400
!     440   480   520   560   600   640   680   720   760   800
!     840
