Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
Specifies that each thread should have its own instance of a variable, and that the variable should be initialized with the value of the variable, because it exists before the parallel construct.
firstprivate
(var)
Parameter | Description |
---|---|
var |
The variable to have instances in each thread and that will be initialized with the value of the variable, because it exists before the parallel construct. If more than one variable is specified, separate variable names with a comma. |
firstprivate
applies to the following directives:
For more information, see 2.7.2.2 firstprivate.
For an example of using firstprivate
, see the example in private.