JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: OpenMP API User's Guide     Oracle Solaris Studio 12.3 Information Library
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 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

Index

6.3 Scoping Rules for a task Construct

Under automatic scoping, the compiler applies the rules described in this section to determine the scope of a variable in a task construct.

These rules do not apply to variables scoped implicitly by the OpenMP specification, such as loop index variables of PARALLEL DO/for loops.

6.3.1 Scoping Rules for Scalar Variables

When autoscoping a scalar variable that is referenced in a task construct and that does not have predetermined or implicitly determined scope, the compiler checks the use of the variable against the following rules TS1-TS5 in the given order.

6.3.2 Scoping Rules for Arrays

Autoscoping for tasks does not handle arrays.