HOME
| OPENMP API Specification: "Version 5.2 -- GIT rev 95b2e3a44"

6.8  uses_allocators Clause

Name: uses_allocators

Properties: data-environment attribute, data-sharing attribute

Arguments

Name

Type

Properties

allocator

expression of allocator_handle type

default

Modifiers

Name

Modifies

Type

Properties

mem-space

Generic

Complex, name: memspace Arguments:

memspace-handle

expression of memspace_handle type (default)

default

traits-array

Generic

Complex, name: traits Arguments:

traits

variable of alloctrait array type (default)

default

Directives

target

Additional information

The comma-separated list syntax, in which each list item is a clause-argument-specification of the form allocator[(traits)] may also be used for the uses_allocators clause arguments. With this syntax, traits must be a constant array with constant values. This syntax has been deprecated.

Semantics

The uses_allocators clause enables the use of the specified allocator in the region associated with the directive on which the clause appears. If allocator refers to a predefined allocator, that predefined allocator will be available for use in the region. If allocator does not refer to a predefined allocator, the effect is as if allocator is specified on a private clause. The resulting corresponding item is assigned the result of a call to omp_init_allocator at the beginning of the associated region with arguments memspace-handle, the number of traits in the traits array, and traits. If mem-space is not specified, the effect is as if memspace-handle is specified as omp_default_mem_space. If traits-array is not specified, the effect is as if traits is specified as an empty array. Further, at the end of the associated region, the effect is as if this allocator is destroyed as if by a call to omp_destroy_allocator.

Restrictions

Cross References