LU example with directives
!HPF$ PROCESSORS P(NP, NP)
!HPF$ TEMPLATE T(N, N)
!HPF$ DISTRIBUTE T(CYCLIC, CYCLIC) ONTO P
REAL A(N, N)
!HPF$ ALIGN A(I, J) WITH T(I, J)
REAL COL(N), ROW(N)
!HPF$ ALIGN COL(I) WITH T(I, *)
!HPF$ ALIGN COL(J) WITH T(*, J)
DO K = 1, N – 1
COL(K:N) = A(K:N, K)
A(K, K+1:N) = A(K, K+1:N) / COL(K)
ROW(K+1:N) = A(K, K+1:N)
FORALL (I = K+1:N, J = K+1:N)
& A(I, J) = A(I, J) – COL(I) * ROW(J)
ENDDO