9.4. Parallel region construct
The following directive defines a parallel region, which is a region of the program that is to be executed by multiple threads in parallel. This is the fundamental construct that starts parallel execution:
#pragma omp parallel [clause[ [, ]clause] ...] new-line structured-block
The clause is one of the following:
if(scalar-expression)
private(variable-list)
firstprivate(variable-list)
default(shared | none)
shared(variable-list)
copyin(variable-list)
reduction(operator: variable-list)
num_threads(integer-expression)
For a detailed description of the clauses, see 9.9, “Data-sharing attribute clauses” on page 355.
When a thread encounters a parallel construct, a team of threads is created if one of the following cases ...
Get Developing and Porting C and C++ Applications on AIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.