Go to main content
Oracle® Developer Studio 12.5: OpenMP API User's Guide

Exit Print View

Updated: July 2016
 
 

6.2 Autoscoping Data Scope Clause

Autoscoping is invoked either by specifying the variables to be scoped on a __auto data scope clause or by using a default(__auto) clause. Both are Oracle Developer Studio extensions to the OpenMP specification.

6.2.1 __auto Clause

Syntax:   __auto(list-of-variables)

For Fortran, __AUTO(list-of-variables) is also accepted.

The __auto clause can appear on a parallel directive (including parallel for/do, parallel sections, and Fortran parallel workshare directive) or on a task directive.

The __auto clause on a parallel or task construct directs the compiler to automatically determine the scopes of the named variables in the construct. (Note the two underscores before auto.)

If a variable is specified in the __auto clause, then it cannot be specified in any other data sharing attribute clause.

6.2.2 default(__auto) Clause

Syntax: default(__auto)

For Fortran, DEFAULT(__AUTO) is also accepted.

The default(__auto) clause can appear on a parallel directive (including parallel for/do, parallel sections, and Fortran parallel workshare directive), or on a task directive.

The default(__auto) clause on a parallel or task construct directs the compiler to automatically determine the scopes of all variables referenced in the construct that are not explicitly scoped in any data scope clause.