/* * @@name: target_ptr_map.2c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include #include #define N 100 #pragma omp declare target int *p; extern void use_arg_p(int *p, int n); extern void use_global_p( int n); #pragma omp end declare target int main() { int i; p = (int *)malloc(sizeof(int)*N); #pragma omp target map(p[:N]) // device p attached to array section { for (i=0; i