The RESIDENT directive can be specified at the loop level and at the routine level. It is an assertion that the references to particular variables in the routine (or loop) are only references to data that are local to the task making the assertion. In the following loop, all references to arrays A, B, and C are local to the task executing each iteration.
REAL A(100), B(100), C(100)
!HPF$ DISTRIBUTE A(BLOCK), B(BLOCK), C(BLOCK)
!HPF$ RESIDENT A
!HPF$ INDEPENDENT (I) ON B(I) RESIDENT(C)
DO I = 1, 100
A(IX(I)) = B(I) + C(IX(I))