XcalableMP Programming Model and Language
53
Fig. 40 In gmove
XcalableMP C
#pragma xmp nodes p[4]
#pragma xmp template t[4]
#pragma xmp distribute t[block] onto p
double a[4], b[4];
5 #pragma xmp align a[i] with t[i]
#pragma xmp align b[i] with t[i]
:
#pragma xmp task on p[0:2]
#pragma xmp gmove out
10
b[2:2] = a[0:2]
#pragma xmp end task
XcalableMP Fortran
!$xmp nodes p(4)
!$xmp template t(4)
!$xmp distribute t(block) onto p
real :: a(4), b(4)
5 !$xmp align a(i) with t(i)
!$xmp align b(i) with t(i)
:
!$xmp task on p(1:2)
!$xmp gmove out
10
b(3:4) = a(1:2)
!$xmp end task
Précédent

- 61/265

Suivant