HPF Example
PROGRAM hpf_finite_difference
!HPF$ PROCESSORS pr(4)
REAL x(100,100), new(100,100)
!HPF$ ALIGN new(:,:) WITH x(:,:)
!HPF$ DISTRIBUTE x(BLOCK, *) ONTO pr
new(2:99,2:99) = (x(1:98,2:99)+x(3:100,2:99)+ &
& x(2:99,1:98)+x(2:99,3:100)) / 4
diff = MAXVAL(ABS(new-x))
end
Previous slide
Next slide
Back to first slide
View graphic version