| Name: allocate | Properties: default |
|
|
Arguments
| Name | Type | Properties |
| list | list of variable list item type | |
|
|
Modifiers
| Name | Modifies | Type | Properties |
| allocator-simple-modifier | list | expression of OpenMP allocator_handle type | exclusive, unique |
| allocator-complex-modifier | list | Complex, name: allocator Arguments:
| unique |
| align-modifier | list | Complex, name: align Arguments:
| unique |
|
|
Directives
allocators, distribute, do, for, parallel, scope, sections, single, target, task, taskgroup, taskloop, teamsSemantics
The allocate clause specifies the memory allocator to be used to obtain storage for a list of variables. If a list item in the clause also appears in a data-sharing attribute clause on the same directive that privatizes the list item, allocations that arise from that list item in the clause will be provided by the memory allocator. If the allocator-simple-modifier is specified, the behavior is as if the allocator-complex-modifier is instead specified with allocator-simple-modifier as its allocator argument. The allocator-complex-modifier and align-modifier have the same syntax and semantics for the allocate clause as the allocator and align clauses have for the allocate directive.For allocations that arise from this clause the null_fb value of the fallback allocator trait behaves as if the abort_fb had been specified.
Restrictions
Restrictions to the allocate clause are as follows:For any list item that is specified in the allocate clause on a directive other than the allocators directive, a data-sharing attribute clause that may create a private copy of that list item must be specified on the same directive.
For task, taskloop or target directives, allocation requests to memory allocators with the trait access set to thread result in unspecified behavior.
allocate clauses that appear on a target construct or on constructs in a target region must specify an allocator-simple-modifier or allocator-complex-modifier unless a requires directive with the dynamic_allocators clause is present in the same compilation unit.
Cross References
Memory Allocators, see Section 6.2
align clause, see Section 6.3
allocator clause, see Section 6.4
allocators directive, see Section 6.7
distribute directive, see Section 11.6
do directive, see Section 11.5.2
for directive, see Section 11.5.1
parallel directive, see Section 10.1
scope directive, see Section 11.2
sections directive, see Section 11.3
single directive, see Section 11.1
target directive, see Section 13.8
task directive, see Section 12.5
taskgroup directive, see Section 15.4
taskloop directive, see Section 12.6
teams directive, see Section 10.2