Technical data
Cray Standard C/C++ Reference Manual
extern long x;
#pragma _CRI soft x /* x is a soft external data object */
extern void f(void);
#pragma _CRI soft f /* f is a soft external function */
long y = 4;
#pragma _CRI soft y /* ERROR - y is actually defined */
static long z;
#pragma _CRI soft z /* ERROR - z is declared static */
void fctn(void)
{
#pragma _CRI soft a /* ERROR - directive must be at global scope */
}
3.5.8 vfunction Directive (UNICOS Systems)
Scope: Global
The vfunction directive lists external functions that use the call-by-register
calling sequence. Such functions can be vectorized but must be written either
in Cray Assembly Language (CAL) or in Fortran using the Fortran vfunction
compiler directive. The format of this directive is as follows:
#pragma _CRI vfunction func
The func variable specifies the name of the external function.
The following example illustrates the use of the vfunction compiler directive:
extern double vf(double);
#pragma _CRI vfunction vf
void f3(int n) {
int i;
for (i = 0; i < n; i++) { /* Vectorized */
b[i] = vf(c[i]);
}
}
56 S–2179–36










