Skip to main content

Module atomics

Module atomics 

Source
Expand description

Atomic operation reference implementations. Atomic operation semantics enforced by the parity engine.

GPU atomic instructions vary in memory ordering and return-value behavior across backends. This module exists to define one sequentially consistent, return-old-value semantics that every backend must match byte-for-byte.

Functions§

apply
Apply one sequentially consistent atomic operation.
atomic_add
Return the old value and the value after atomic add.
atomic_and
Return the old value and the value after atomic bitwise AND.
atomic_compare_exchange
Return the old value and the value after atomic compare-exchange.
atomic_exchange
Return the old value and the replacement value for atomic exchange.
atomic_max
Return the old value and the value after atomic unsigned maximum.
atomic_min
Return the old value and the value after atomic unsigned minimum.
atomic_or
Return the old value and the value after atomic bitwise OR.
atomic_xor
Return the old value and the value after atomic bitwise XOR.