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

6.6  allocate Clause



Name: allocate

Properties: default



Arguments




Name

Type

Properties




list

list of variable list item type

default




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:

allocator

expression of allocator_handle type (default)

unique





align-modifier

list

Complex, name: align Arguments:

alignment

expression of integer type (constant, positive)

unique





Directives

allocators, distribute, do, for, parallel, scope, sections, single, target, task, taskgroup, taskloop, teams

Semantics

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:

Cross References