atomicAdd method
Atomically adds value to the 32-bit element at index and returns
the previous value. index is in Int32 elements, not bytes.
Implementation
@override
int atomicAdd(int index, int value) {
_checkIndex(index);
final previous = _atomicView[index];
_atomicView[index] = previous + value;
return previous;
}