[libcxx-commits] [libcxxabi] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)
Anton Rydahl via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 27 18:03:05 PDT 2023
AntonRydahl wrote:
I have also added a number of tests that verify that vectors of primitive data types are offloaded to the GPU. They use `omp_is_initial_device()` to test whether the loop bodies run on the host or the device.
If there are no available devices, the new tests simply don't run:
```c++
if (omp_get_num_devices() < 1)
return 0;
```
Also, I have introduced a new feature such that they only run when the OpenMP PSTL backend is enabled:
```c++
// REQUIRES: openmp_pstl_backend
```
https://github.com/llvm/llvm-project/pull/66968
More information about the libcxx-commits
mailing list