10 #pragma omp target map(tofrom: c)
18 void test_ref_to_ptr ()
22 int *&ptr_ref = ptr_orig;
24 #pragma omp target map(tofrom: ptr_ref[0])
32 void test_ref_to_array ()
35 int (&arr_ref)[1] = arr;
39 #pragma omp target map(tofrom: arr_ref[0:1])
44 assert (arr_ref[0] == 6);
46 #pragma omp target map(tofrom: arr_ref[0])
51 assert (arr_ref[0] == 7);
54 void test_ref_to_ptr_array ()
57 int *(&arr_ref)[1] = arr;
62 #pragma omp target data map(alloc: arr_ref, arr_ref[0])
64 #pragma omp target map(tofrom: arr_ref[0][0:1])
70 assert (arr_ref[0][0] == 6);
78 test_ref_to_ptr_array ();