--- layout: stdlib-reference --- # InterlockedXor ## Description Perform an atomic xor operation on dest. ## Signature
void InterlockedXor<T>(
    T dest,
    T value)
    where T : IArithmeticAtomicable;

void InterlockedXor<T>(
    T dest,
    T value,
    out T original_value)
    where T : IArithmeticAtomicable;

void InterlockedXor(
    uint dest,
    int value);

## Generic Parameters #### T: [IArithmeticAtomicable](../interfaces/iarithmeticatomicable-01b/index.html) The type of the value to perform the atomic operation on. ## Parameters #### dest : [T](interlockedxor-0b.html#typeparam-T) The value to perform the atomic operation on. #### value : [T](interlockedxor-0b.html#typeparam-T) The operand to the atomic operation. #### original\_value : [T](interlockedxor-0b.html#typeparam-T) The value of dest before the operation. #### dest : uint The value to perform the atomic operation on. #### value : int The operand to the atomic operation. ## Remarks When targeting HLSL, it is invalid to call this function with T being a floating-point type, since HLSL does not allow atomic operations on floating point types. For InterlockedAdd, consider using RWByteAddressBuffer.InterlockedAddF32 or RWByteAddressBuffer.InterlockedAddF16 instead when NVAPI is available. On SPIR-V (Vulkan), all integer and floating point types are supported. On Metal and WGSL, all floating-point types are not supported. ## Availability and Requirements Defined for the following targets: #### hlsl Available in all stages. #### glsl Available in all stages. #### cuda Available in all stages. #### metal Available in all stages. #### spirv Available in all stages.