Basic HTML version of Foils prepared
16 Sept 1995
Foil 26 Advanced Mapping Directives -- Allocatable arrays and pointers
From
HPFtutorial CPS615 Basic Simulation Track for Computational Science --
Fall Semester 95
.
by
Geoffrey C. Fox(Tomasz Haupt)
SUBROUTINE SUB(N,M)
REAL, ALLOCATABLE, DIMENSION(:) :: A,B
REAL, POINTER :: P(:)
!HPF$ PROCESSORS Q(64)
!HPF$ ALIGN B(I) WITH A(I+N)
!HPF$ DISTRIBUTE A(BLOCK(M))
!HPF$ DISTRIBUTE(BLOCK), DYNAMIC :: P
...
ALLOCATE(A(128))
ALLOCATE(B(64))
ALLOCATE(P(1024))
...
!HPF$ REDISTRIBUTE P(CYCLIC)
...
RETURN
END
©
on Tue Oct 7 1997