Add ability to allow user to specifically exclude atomic operators
I've come across a situation where I need to be able to selectively turn off atomic operations. This results when, for instance, initialization of an array can proceed without atomics but the last index of the array must be set as some sort of sum of the previous indices as in the following (silly) pseudo-code:
for j
<> sum = 0
for i
a[i, j] = i {atomic=none}
sum = sum + i
end
a[n, n] = a[n, n] - sum {atomic}
end
with j
vectorized along either the global or local axis
It does this by adding a new VarAtomicity
type, NonAtomic
, which may be specified in the instruction options block, i.e. the atomic=none
option above.
Additionally, a test for "mixed" atomics has been added in test_loopy.py
Edited by Nick Curtis