[Patch] OpenMP, libgomp: Add new runtime routine omp_target_is_accessible.

2022-03-11 Thread Marcel Vollweiler
Hi, This patch adds the OpenMP runtime routine "omp_target_is_accessible" which was introduced in OpenMP 5.1 (specification section 3.8.4): "The omp_target_is_accessible routine tests whether host memory is accessible from a given device." "This routine returns true if the storage of size bytes

Re: [Patch] OpenMP, libgomp: Add new runtime routine omp_target_is_accessible.

2022-03-11 Thread Tobias Burnus
Minor remark to the test: On 11.03.22 13:30, Marcel Vollweiler wrote: + int d = omp_get_default_device (); ... + int shared_mem = 0; + #pragma omp target map (alloc: shared_mem) device (d) +shared_mem = 1; + if (omp_target_is_accessible (p, sizeof (int), d) != shared_mem) +__builti