1 // RUN: %libomptarget-compile-run-and-check-generic
6 void *llvm_omp_target_alloc_shared(size_t, int);
7 void llvm_omp_target_free_shared(void *, int);
11 const int device
= omp_get_default_device();
13 int *shared_ptr
= llvm_omp_target_alloc_shared(N
* sizeof(int), device
);
15 #pragma omp target teams distribute parallel for device(device) \
16 is_device_ptr(shared_ptr)
17 for (int i
= 0; i
< N
; ++i
) {
22 for (int i
= 0; i
< N
; ++i
)
25 llvm_omp_target_free_shared(shared_ptr
, device
);