omp_init_allocator – Create an allocator ¶Create an allocator that uses the specified memory space and has the specified
traits; if an allocator that fulfills the requirements cannot be created,
omp_null_allocator is returned.
The predefined memory spaces and available traits can be found at
Memory allocation, where the trait names have to be prefixed by
omp_atk_ (e.g. omp_atk_pinned) and the named trait values by
omp_atv_ (e.g. omp_atv_true); additionally, omp_atv_default
may be used as trait value to specify that the default value should be used.
| Prototype: | omp_allocator_handle_t omp_init_allocator( |
omp_memspace_handle_t memspace, | |
int ntraits, | |
const omp_alloctrait_t traits[]); |
| Interface: | function omp_init_allocator(memspace, ntraits, traits) |
integer (omp_allocator_handle_kind) :: omp_init_allocator | |
integer (omp_memspace_handle_kind), intent(in) :: memspace | |
integer, intent(in) :: ntraits | |
type (omp_alloctrait), intent(in) :: traits(*) |
Memory allocation, OMP_ALLOCATOR – Set the default allocator, omp_destroy_allocator – Destroy an allocator
OpenMP specification v5.0, Section 3.7.2