Technical data
Cray Standard C/C++ Reference Manual
/* References of arrays a, b and c bypass cache.
References to ix and d go through cache. */
void indirect(double a[], double b[], double c[], double d[], int ix[], int n)
{
int i;
#pragma _CRI cache_bypass a,b,c
#pragma _CRI ivdep
for (i = 0; i < n; i++) {
a[ix[i]] = b[ix[i]] + c[ix[i]] * d[i];
}
}
To see the most benefit from the cache_bypass directive, you may want to
enable loop unrolling. For information on the command line option to control
unrolling, see Chapter 2, page 3.
This feature may disable the UNICOS/mk system stream buffer hardware feature
for the entire program. This is done on certain Cray T3E platforms because the
compiler cannot guarantee correctness in terms of the interaction of the stream
buffers and the E register operations generated by this directive. Disabling
stream buffers can cause considerable performance degradation for other parts
of your program. The stream buffer features can be reenabled by using the
set_d_stream(3) library function. Consult with your system administrator to
determine whether your Cray T3E system falls into this category. If so, see the
streams_guide(7) man page for details on how and when streams can be safely
reenabled in the presence of E register operations.
3.10.4 concurrent Directive (Cray SV1 series and Cray T3E Systems Only)
Scope: Local
The concurrent directive indicates that no data dependence exists between
array references in different iterations of the loop that follows the directive. This
can be useful for vectorization, multi-streaming, and tasking optimization on
Cray SV1 series systems and for pipelining optimization on Cray T3E systems.
The format of the concurrent directive is as follows:
#pragma _CRI concurrent [safe_distance=n]
92 S–2179–36










