atomic_fetch_max Function

Atomically computes the maximum value between the value stored at the memory location specified in the first argument and the value specified in the second argument, and stores it at the same memory location.

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

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

Parameters

  • _Dest
    The location from which one of the values to be compared is read, and to which the maximum of the two values is to be stored.

  • _Value
    The value to be compared to the value at the specified location.

Return Value

The original value stored at the specified location location.

Requirements

Header: amp.h

Namespace: Concurrency

See Also

Reference

Concurrency Namespace (C++ AMP)