Technical data

#pragma Directives [3]
(Guarded regions are discussed in Section 3.8.7, page 74.) The endloop
directive ensures that no processor can proceed beyond this point until all have
contributed to the sum and big values.
3.8.6 case and endcase Directives (UNICOS Systems)
Scope: Local
The case directive serves as a separator between adjacent code blocks that
are concurrently executable. The case directive can appear only in a parallel
region. The endcase directive serves as the terminator for a group of one or
more parallel cases.
The format of the case and endcase directives is as follows:
#pragma _CRI case
#pragma _CRI endcase
In the following example, the first, second, and third loops execute concurrently:
#pragma _CRI parallel private(i) shared(a,b,c)
#pragma _CRI case
for (i = 0; i < 1000; i++) {
/* This loop #1 executes in parallel with loops
#2 and #3. */
a[i] = 0;
}
#pragma _CRI case
/* This loop #2 executes in parallel with loops
#1 and #3. */
for (i = 0; i < 1000; i++) {
b[i] = 1;
}
#pragma _CRI case
/* This loop #3 executes in parallel with
loops #1 and #2. */
for (i = 0; i < 1000; i++) {
c[i] = 2;
}
#pragma _CRI case /* empty case is allowed */
#pragma _CRI endcase
.
S217936 73