The DEFAULT clause lets you specify a scope for all variables in the
lexical extent of a parallel region. It takes the following form:
- DEFAULT ( PRIVATE | SHARED | NONE  )
 
The specifications have the following effects:
   - PRIVATE - Makes all named objects in the 
   lexical extent of the parallel region, including common block variables but
   excluding THREADPRIVATE (or TASKCOMMON) variables, private to
   a thread as if you explicitly listed each variable in a PRIVATE
   clause.
 
   - SHARED - Makes all named objects in the lexical 
   extent of the parallel region shared among the threads in a team, as if you
   explicitly listed each variable in a SHARED clause. If you do not
   specify a DEFAULT clause, this is the default.
 
   - NONE - Specifies that there is no implicit default as
   to whether variables are PRIVATE or SHARED. In this case, you
   must specify the PRIVATE, SHARED, FIRSTPRIVATE, LASTPRIVATE, or
   REDUCTION property of each variable you use in the lexical extent
   of the parallel region.
 
You can specify only one DEFAULT clause in a PARALLEL directive. You
can exclude variables from a defined default by using the PRIVATE,
SHARED, FIRSTPRIVATE, LASTPRIVATE, or REDUCTION clauses.
Variables in THREADPRIVATE (or TASKCOMMON) common blocks are not
affected by this clause. 
Previous Page  Next Page  Table of Contents