User`s guide

Compiler Overview [7]
7.10 Using Compiler Directives and Assertions
Directives are metalanguage constructs that you can add to a program to influence
how the compiler performs a translation. In C and C++, you prefix directives with
#pragma mta. Macros are allowed after the word mta in a pragma, as shown in
this example:
#define NUMSTREAMS 40 ...
#pragma mta use NUMSTREAMS streams
The preceding pragma is equivalent to #pragma mta use 40 streams.
You can also write compiler directives in C and C++ code using _Pragma rather
than #pragma mta. In this case, the directive appears syntactically as if it were a
single string argument to a function call, as shown in the following command.
_Pragma("mta assert parallel")
The advantage to using the command form of this directive is that you can use it in
macros or similar locations. The disadvantage of this form is that most C and C++
compilers treat it as an actual function, which makes the code less portable.
Directives are grouped into five general categories: compilation directives,
parallelization directives, semantic assertions, implementation hints, and
language-extension directives. A compilation directive is a command to compile
a program in a particular way. Parallelization directives tell the compiler how to
parallelize various sections of a program. Semantic assertions provide information to
the compiler that could be proved true about the program even though that proof is
beyond the capabilities of the compiler. Implementation hints tell the compiler about
the expected behavior of the program. Language-extension directives allow you to
place Cray XMT specific language features into a program without interfering with
the portability of code to other systems.
For more information, see Appendix C, Compiler Directives and Assertions on
page 109.
S247920 89