Share via


lastprivate

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

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).

Syntax

lastprivate
(var)  

Remarks

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).

Remarks

lastprivate applies to the following directives:

For more information, see 2.7.2.3 lastprivate.

Example

See schedule for an example of using lastprivate clause.

See Also

Clauses