Name: allocators | Association: block (allocator structured block) |
Category: executable | Properties: default |
|
Clauses
allocateAdditional 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:A list item that appears in an allocate clause must appear as one of the variables that is allocated by the allocate-stmt in the associated allocator structured block.
Additional restrictions to the (deprecated) allocate directive when it is associated with an allocator structured block are as follows:
If a list is specified, the directive must be preceded by an executable statement or OpenMP construct.
If multiple allocate directives are associated with an allocator structured block, at most one directive may specify no list items.
Cross References
Memory Allocators, see Section 6.2
OpenMP Allocator Structured Blocks, see Section 4.3.1.1
allocate clause, see Section 6.6
allocate directive, see Section 6.5