JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: OpenMP API User's Guide
search filter icon
search icon

Document Information

Preface

1.  Introducing the OpenMP API

2.  Compiling and Running OpenMP Programs

3.  Implementation-Defined Behaviors

4.  Nested Parallelism

5.  Tasking

6.  Automatic Scoping of Variables

6.1 The Autoscoping Data Scope Clause

6.1.1 __auto Clause

6.1.2 default(__auto) Clause

6.2 Scoping Rules for a Parallel Construct

6.2.1 Scoping Rules For Scalar Variables

6.2.2 Scoping Rules for Arrays

6.3 Scoping Rules for a task Construct

6.3.1 Scoping Rules for Scalar Variables

6.3.2 Scoping Rules for Arrays

6.4 General Comments About Autoscoping

6.5 Restrictions

6.6 Checking the Results of Autoscoping

6.7 Autoscoping Examples

7.  Scope Checking

8.  Performance Considerations

A.  Placement of Clauses on Directives

B.  Converting to OpenMP

Index

6.1 The Autoscoping Data Scope Clause

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

6.1.1 __auto Clause

Syntax:   __auto(list-of-variables)

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

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

The __auto clause can appear on a PARALLEL, PARALLEL DO/for, PARALLEL SECTIONS, Fortran 95 PARALLEL WORKSHARE, or TASK directive.

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

6.1.2 default(__auto) Clause

Syntax: default(__auto)

For Fortran, DEFAULT(__AUTO) is also accepted.

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

The default(__auto) clause can appear on a PARALLEL, PARALLEL DO/for, PARALLEL SECTIONS, Fortran 95 PARALLEL WORKSHARE, or TASK directive.