21 scp (sa *&my_a, sb *&my_b) : a(my_a), b(my_b) {}
30 my_a->ptr = new int[10];
31 my_a->ptr2 = new int[10];
32 scp *my_c = new scp(my_a, my_b);
34 memset (my_c->a->ptr, 0, sizeof (int) * 10);
35 memset (my_c->a->ptr2, 0, sizeof (int) * 10);
37 #pragma omp target map (my_c->a, \
38 my_c->a->ptr, my_c->a->ptr[:10], \
39 my_c->a->ptr2, my_c->a->ptr2[:10])
41 for (int i = 0; i < 10; i++)
44 my_c->a->ptr2[i] = i * 2;
48 for (int i = 0; i < 10; i++)
50 assert (my_c->a->ptr[i] == i);
51 assert (my_c->a->ptr2[i] == i * 2);