Technical data
Cray Standard C/C++ Reference Manual
The noreduction compiler directive tells the compiler to not optimize the loop
that immediately follows the directive as a reduction loop. If the loop is not a
reduction loop, the directive is ignored.
A reduction loop is a loop that contains at least one statement that reduces an
array to a scalar value by doing a cumulative operation on many of the array
elements. This involves including the result of the previous iteration in the
expression of the current iteration.
You may choose to use this directive when the loop iteration count is small
or when the order of evaluation is numerically significant. It overrides any
vectorization-related directives as well as the -h vector and -h ivdep
command line options. The effect of the noreduction directive differs
depending on your platform.
On UNICOS systems, the noreduction directive disables vectorization of any
loop that contains a reduction. The specific reductions that are disabled are
summation and product reductions, and alternating value computations. On
UNICOS/mk systems, the noreduction directive prevents the compiler from
rewriting loops involving multiplication or exponentiation by an induction
variable to be a series of additions or multiplications of a value.
Regardless of platform, however, the format of this directive is as follows:
#pragma _CRI noreduction
The following example illustrates the use of the noreduction compiler
directive:
sum = 0;
#pragma _CRI noreduction
for (i = 0; i < n; i++) {
sum += a[i];
}
3.10.7 split Directive (UNICOS/mk Systems)
Scope: Local
The split directive instructs the compiler to attempt to split the following loop
into a set of smaller loops.
Such loop splitting attempts to improve single processor performance by making
best use of the six stream buffers of the UNICOS/mk system. It achieves this
94 S–2179–36










