User`s guide

Cray XMT Programming Environment Users Guide
#pragma mta assert no dependence variable-list
#pragma mta assert nodep variable-list
This directive can appear before a loop construct and asserts that if
a word of memory is accessed during execution of the loop through
any load or store derived from a variable in variable-list, the word is
accessed from exactly one iteration of the loop. You can also use the
word nodep in place of no dependence. For example:
void nodep_example(const int INDEX[], double IA[100][100],
const int N)
{
// You know that index[I] is never 1.
#pragma mta assert noalias *IA
#pragma mta assert no dependence *IA
for (int i = 0; i < N; i++) {
IA[i][1] = IA[i][INDEX[i]];
}
}
#pragma mta assert may reorder variable-list
#pragma mta may reorder variable-list
This directive allows the compiler to reorder accesses of the variables
in variable-list with respect to other volatile and global references in
the code. This directive is used to remove unnecessary restrictions
that may be placed on the order of execution. For example, in the
following code, if SYNCARRAY$ is a sync-qualified array, the order
of accesses to the various elements of the array are serialized, and
the loop is not parallelized:
void may_reorder_example(sync int SYNCARRAY$[10000])
{
for (int i = 0; i < 10000; i++) {
SYNCARRAY$[i] = 0;
}
}
128 S247920