Function spirv_std::arch::atomic_i_increment
source · pub unsafe fn atomic_i_increment<I: Integer, const SCOPE: u32, const SEMANTICS: u32>(
ptr: &mut I
) -> I
Expand description
Perform the following steps atomically with respect to any other atomic
accesses within SCOPE
to the same location:
- Load through
ptr
to get an original value, - Get a new value through integer addition of 1 to original value, and
- Store the new value back through
ptr
.
The result is the original value.