User`s guide

Cray XMT Programming Environment Users Guide
#pragma mta no scalar expansion
This directive instructs the compiler not to expand scalar variables to
vector temporaries in the next loop. Such expansion allows you to
distribute the loop to enhance available parallelism or make effective
use of registers. However, if the loop iterates only a few times,
the increase in memory usage for the expansion may outweigh the
benefits. In this case, you can use the no scalar expansion
pragma to prevent expansion. For example, in the following code, the
use of no scalar expansion ensures that the definition of T
and its use remain in the same loop.
void no_scalar_example(double X[], const int N)
{
extern double Y[], Z[];
#pragma mta no scalar expansion
for (int i = 0; i < N; i++) {
const double T = Y[i*2];
X[i] = T + Z[i*3];
}
}
#pragma mta once
This directive, when placed inside an included file, instructs the C
preprocessor to include this file only once in any single compilation
unit regardless of the number of #include directives encountered.
In the following example, the file foo.h is included in the file
foo.c one time only.
file foo.h:
#pragma mta once
int i;
file foo.c:
#include "foo.h"
#include "foo.h"
#include "foo.h"
main() {
}
This directive may also be specified as #pragma once. The
directive may occur at any point in the file to be included.
#pragma mta single round required
This directive specifies that the compiler generate a fused
multiply-add instruction for every expression (or subexpression)
of the form X + Y*Z, X - Y*Z, or Y*Z - X. This selection can be
ambiguous, as shown in the following:
A = B*C + D*E
120 S247920