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

! This program requires both shift and remap 

      PROGRAM MAIN 
      REAL X(-98:197), Y(-47:390) 
!HPF$ PROCESSORS P(4) 
!HPF$ TEMPLATE TX(-199:473),TY(-95:786) 
!HPF$ DISTRIBUTE TX(CYCLIC) ONTO P 
!HPF$ DISTRIBUTE TY(CYCLIC) ONTO P 
!HPF$ ALIGN X(i) WITH TX(2*i+5) 
!HPF$ ALIGN Y(i) WITH TY(2*i+0) 

      FORALL (i=-98:197) X(i) = 0 
      FORALL (i=-47:390) Y(i) = i 
      FORALL (i=-8:190:3) X(i) = Y(1*i+4) + Y(2*i+1) 

      PRINT 111, (X(i),i=-98,197) 
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 
!  4 -98 -47 197 390 -8 190 3 2 2 2 2 1 2 -199 473 -95 786 5 0 4 1 


!  Some selected output values for X(i)=-8,190,15:
!     -19    26    71   116   161   206   251   296   341   386
!     431   476   521   566
