User`s guide
Cray XMT™ Programming Environment User’s Guide
C.2 Parallelization Directives
The compiler recognizes the following parallelization directives.
#pragma mta parallel [on|off|default|
single processor|multiprocessor|future]
This directive enables or disables automatic generation of
parallel code for a section of the program as well as choosing
the form of parallelism to use. The single processor,
multiprocessor, and future flags indicate the type of
parallelism to use. The off flag turns off parallelism until it is
turned back on or reaches the end of the file. The on flag turns on
parallel-code generation using the last specified form of parallelism.
The default flag uses the command-line option or the default form
of parallelism. By default, automatic generation of multiprocessor
parallel code is enabled. This directive applies to whatever follows
it textually in the current file. It stays in effect until the end of the
file or until another directive of the same kind is encountered. The
directive is ignored if the -nopar flag is used on the command line.
#pragma mta recurrence [on|off|default]
This directive enables/disables automatic parallelization of
recurrences and reductions. By default, recurrence-relation
parallelization is enabled. Recurrence relations are parallelized,
however, only in areas in which parallelization is otherwise allowed.
This directive applies to whatever follows it textually in the current
file. It stays in effect until the end of the file or until another directive
of the same kind is encountered. The directive is ignored if the
-nopar flag is used on the command line.
#pragma mta restructure [on|off|default]
This directive enables/disables loop restructuring and loop
transformations. By default, loop restructuring is allowed in areas in
which parallelization is allowed and it is turned off in areas in which
parallelization is not allowed. This directive applies to whatever
follows it textually in the current file. It stays in effect until the end
124 S–2479–20