1 // RUN: %libomptarget-compile-run-and-check-generic
13 #pragma omp declare mapper(id : C s) map(s.a[0 : NUM])
17 c
.a
= (int *)malloc(sizeof(int) * NUM
);
18 for (int i
= 0; i
< NUM
; i
++) {
21 #pragma omp target enter data map(mapper(id), to : c)
22 #pragma omp target teams distribute parallel for
23 for (int i
= 0; i
< NUM
; i
++) {
26 #pragma omp target exit data map(mapper(id), from : c)
28 for (int i
= 0; i
< NUM
; i
++) {
32 printf("Sum = %d\n", sum
);