2 // RUN: %libomptarget-compilexx-generic
3 // RUN: env OMPX_APU_MAPS=1 HSA_XNACK=1 LIBOMPTARGET_INFO=30 %libomptarget-run-generic 2>&1 \
4 // RUN: | %fcheck-generic -check-prefix=INFO_ZERO -check-prefix=CHECK
6 // RUN: %libomptarget-compilexx-generic
7 // RUN: env HSA_XNACK=0 LIBOMPTARGET_INFO=30 %libomptarget-run-generic 2>&1 \
8 // RUN: | %fcheck-generic -check-prefix=INFO_COPY -check-prefix=CHECK
11 // REQUIRES: unified_shared_memory
20 // test various mapping types
25 for (int i
= 0; i
< n
; i
++)
29 // INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified shared memory
30 // INFO_ZERO: Return HstPtrBegin 0x{{.*}} Size=4096 for unified shared memory
32 // INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}}, HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096,
33 // INFO_COPY: Creating new map entry with HstPtrBase=0x{{.*}}, HstPtrBegin=0x{{.*}}, TgtAllocBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096,
34 // INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
35 // INFO_COPY: Mapping exists with HstPtrBegin=0x{{.*}}, TgtPtrBegin=0x{{.*}}, Size=4096, DynRefCount=1 (update suppressed)
37 #pragma omp target teams distribute parallel for map(tofrom : a[ : n]) \
39 for (int i
= 0; i
< n
; i
++)
43 for (int i
= 0; i
< n
; i
++)
44 if (a
[i
] != i
+ b
[i
] + k
)