Clauses in OpenMP/2
reduction({op|intrinsic}:list)
- variables in the list are named scalars of intrinsic type
- a private copy of each variable in the list will be constructed and initialized according to the intended operation. At the end of the parallel region or other synchronization point all private copies will be combined with the operation
- the operation must be in the form
- x = x op expr
- x = intrinsic(x,expr)
- if (x .LT. expr ) x = expr
- x++; x--; ++x; --x;
- where expr does not contain x
-
-
-
-
-
-
-
-
- example:
!$OMP PARALLEL DO REDUCTION(+: A,Y) REDUCTION(.OR.: S)