SUBROUTINE S7 ( A, BUFNUM, ISEED ) c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c This subroutine generates a buffer of the pseudo-random A stream c for Benchmark #7 c c Parameters: c Provided by calling routine: c BUFNUM = Number of this buffer of A in the full stream c ISEED = Seed for randon number generator c c Returned by this routine: c A = Array holding the data c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc #include "bench7.h" c IMPLICIT INTEGER (A-Z) c INTEGER (kind=8) A(*) INTEGER (kind=8) PAT1010, PAT0101 INTEGER (kind=8) MYF, MYL c MIS = -ISEED MYF = 0 MYL = 0 c CALL GET_MY_BDATA64( BUFNUM, 1,1, BUFSIZE, 1, MIS, A, MYF,MYL ) c c Artificially insert several regions that produce c 600-long patterns in the B and C streams and thence c 500-long runs of zeros in E-stream c PAT1010 = Z'AAAAAAAAAAAAAAAA' PAT0101 = Z'5555555555555555' c DO 20 I = 0, 20 A( I + 68750 ) = PAT1010 A( I + 78776 ) = PAT0101 A( I + 137500 ) = 0 A( I + 157552 ) = -1 20 CONTINUE c c Create a zero region overlapping end of buff i and start of buff i+1, i>=0 c Region at end of buffer is not long enough without beginning of next buffer c So no trouble checking results: we get 5 regions in each buffer except c the last one, which has 4 regions I1 = 4 I2 = 6 DO I = 0, I1-1 A(BUFSIZE-I) = 0 ENDDO IF (BUFNUM .GT. 1) THEN DO I = 1, I2 A(I) = 0 ENDDO ENDIF c RETURN END