spirv_std::arch

Function atomic_s_min

Source
pub unsafe fn atomic_s_min<S: SignedInteger, const SCOPE: u32, const SEMANTICS: u32>(
    ptr: &mut S,
    value: S,
) -> S
Expand description

Perform the following steps atomically with respect to any other atomic accesses within Scope to the same location:

  1. Load through ptr to get an original value,
  2. Get a new value by finding the smallest signed integer of original value and value, and
  3. Store the new value back through ptr.

The result is the original value.