atomic_exchange Function

Sets the value of destination location as an atomic operation.

inline int atomic_exchange(
   _Inout_ int * _Dest,
   int _Value                     
) restrict(amp);

inline unsigned int atomic_exchange(
   _Inout_ unsigned int * _Dest,
   unsigned int _Value                     
) restrict(amp);

inline float atomic_exchange(
   _Inout_ float * _Dest,
   float _Value                     
) restrict(amp);

Parameters

  • _Dest
    Pointer to the destionation location.

  • _Value
    The new value.

Return Value

The original value of the destination location.

Requirements

Header: amp.h

Namespace: Concurrency

See Also

Reference

Concurrency Namespace (C++ AMP)