User`s guide
Cray XMT™ Programming Environment User’s Guide
#pragma mta fenv_access [on|off|default]
This directive specifies whether the full floating-point environment
is available. When fenv_access is on, strict rules against the
optimization of floating-point operations are enforced. If it is off,
extra optimizations are performed, but floating-point exceptions may
be lost in certain cases. The compiler is allowed to attempt either one
or both of two optimization techniques when fenv_access is off.
The first technique is to evaluate floating-point operations at compile
time. The second is to move floating-point operations to locations
where they are executed with less frequency, such as outside a loop.
In the following example, the addition in the statement that assigns a
value to G can be performed at compile-time, but the addition in the
statement that assigns a value to F cannot.
void sub(void) {
float F;
float G;
#pragma mta fenv_access off
G = 2.5 + 3.1;
#pragma mta fenv_access on
F = 2.5 + 3.1;
}
This directive applies to whatever follows it textually in the current
file. The directive stays in effect until the end of the file or until
another directive of the same kind is encountered. The off and on
options to the fenv_access directive takes precedence over the
-no_float_opt command-line option. The default option
to the directive enables floating-point environment access (disables
floating-point optimization) if the -no_float_opt command-line
option was used. Default disables floating-point environment
access (enables optimization) if the command-line option was
not used. The directive may also be specified in C as #pragma
fenv_access [on|off|default].
#pragma mta for all streams
This directive starts up a parallel region (if the code is not already in
a parallel region) and cause the next statement or block of statements
to be executed exactly once on every stream allocated to the region.
If the pragmas appear in code that would otherwise not be parallel,
they cause it to go parallel.
112 S–2479–20