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

6.7  allocators Construct



Name: allocators

Association: block (allocator structured block)

Category: executable

Properties: default



Clauses

allocate

Additional information

The allocators construct may alternatively be expressed as one or more allocate directives that precede the allocator structured block. The syntax of these directives are as described in Section 6.5, except that the list directive argument is optional. If a list argument is not specified, the effect is as if there is an implicit list consisting of the names of each variable to be allocated in the associated allocate-stmt that is not explicitly listed in another allocate directive associated with the statement. allocate directives are semantically equivalent to an allocators directive that specifies OpenMP allocators and the variables to which they apply in one or more allocate clauses, and restricted uses of the allocators directive imply that equivalent uses of allocate directives are also restricted. If the allocate directive is used, an allocator will be used to allocate all variables even if they are not explicitly listed. This alternate syntax has been deprecated.

Semantics

The allocators construct specifies that OpenMP memory allocators are used for certain variables that are allocated by the associated allocate-stmt. If a variable that is to be allocated appears as a list item in an allocate clause on the directive, an OpenMP allocator is used to allocate storage for the variable according to the semantics of the allocate clause. If a variable that is to be allocated does not appear as a list item in an allocate clause, the allocation is performed according to the base language implementation.

Restrictions

Restrictions to the allocators construct are as follows:

Additional restrictions to the (deprecated) allocate directive when it is associated with an allocator structured block are as follows:

Cross References