Alex wrote:
Tested on x86_64-pc-linux-gnu, this is only a library addition (and a
few tests) so it shouldn't cause any major impacts.  I also tested
libgomp C to ensure the conditional compile was working.

Namely, the change is only to omp.h(.in) - effective for
__cplusplus >= 201103L.

Note that the following is an OpenMP 5.0 feature that for some reason
was missed when implementing omp_alloc / omp_free support.

   omp::allocator:: ... <T>

where ... is the name of a predefined allocator (with omp_ and _alloc stripped).
[Support for omp::allocator::null_allocator is a (semi-accidental)
OpenMP 6.0 feature, where omp_null_allocator implies that the allocator
of default-allocator-var ICV is used.]

The main use case of this feature is to make it easy to use those
allocators with containers from the STL like:

  std::vector<int, omp::allocator::cgroup_mem<int>> var;

where cgroup_mem uses low latency memory on AMD and Nvidia GPU devices,
which is faster than the normal allocator.
(→ https://gcc.gnu.org/onlinedocs/libgomp/Offload-Target-Specifics.html
for cgroup_mem )

* * *

LGTM. Thanks for the patch!

Tobias

Reply via email to