6 int *dp = (int*)omp_target_alloc (30*sizeof(int), 0);
8 #pragma omp target is_device_ptr(dp)
9 for (int i = 0; i < 30; i++)
12 int (&x)[30] = *static_cast<int(*)[30]>(static_cast<void*>(dp));
14 #pragma omp target has_device_addr(x)
15 for (int i = 0; i < 30; i++)
18 #pragma omp target has_device_addr(x)
19 for (int i = 0; i < 30; i++)
23 #pragma omp target has_device_addr(x[1:5])
24 for (int i = 1; i < 6; i++)
27 #pragma omp target has_device_addr(x[1:5])
28 for (int i = 1; i < 6; i++)
32 omp_target_free (dp, 0);