XcalableMP / Specification

Specification of XcalableMP
0 stars 0 forks source link

構造体のメンバの分散 #62

Open mnakao opened 6 years ago

mnakao commented 6 years ago
struct test{
  int a[100], b[100];
#pragma xmp align a[i] with t[i]
  int c[100];
};
type :: test
  integer :: a(100), b(100)
!$xmp align a(i) with t(i)
  integer :: c(100)
end type test

構造体のメンバを分散配列にする場合は、その定義内かつ分散化したい配列の後にaligin指示文で分散を指定する。 なお、分散化した配列をメンバとして持つ構造体配列は分散化できない。NGの例を下記に示す。

struct test{
  int a[100], b[100];
#pragma xmp align a[i] with t1[i]
  int c[100];
};

int main()
{
  struct test d[100];
#pragma xmp align d[i] with t2[i] <-- NG
}