lastprivate
Specifies that the enclosing context's version of the variable is set equal to the private version of whichever thread executes the final iteration (for-loop construct) or last section (#pragma sections).
lastprivate(var)
Заметки
where,
- var
The variable that is set equal to the private version of whichever thread executes the final iteration (for-loop construct) or last section (#pragma sections).
Заметки
lastprivate applies to the following directives:
For more information, see 2.7.2.3 lastprivate.
Пример
See schedule for an example of using lastprivate clause.