Oracle® Solaris Studio 12.4: OpenMP API User's Guide

Exit Print View

Updated: December 2014
 
 

6.5 Notes About Autoscoping

Specifying the _auto(list-of-variables) or default(_auto) clause on a parallel construct doesn't imply that the same clause applies to task constructs that are lexically or dynamically enclosed in the parallel construct.

When autoscoping a variable that does not have predetermined implicit scope, the compiler checks the use of the variable against the rules in the given order. If a rule matches, the compiler will scope the variable according to the matching rule. If no rule matches, or if autoscoping cannot handle the variable, the compiler will scope the variable as shared and treat the parallel or task construct as if an if(0) (if(.false.) in Fortran) clause was specified. For more information, see Restrictions When Using Autoscoping.

A variable generally cannot be autoscoped if the use of the variable does not match any of the rules or if the source code is too complex for the compiler to do a sufficient analysis. Function calls, complicated array subscripts, memory aliasing, and user-implemented synchronizations are some typical causes.