共用方式為


atomic_fetch_max 函式

執行將一值與一記憶體位置中的值比較,並將較大者存入該記憶體位置的不可部份完成作業。

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);

參數

  • _Dest
    指向目的位置的指標。

  • _Value
    欲進行比較的值。

傳回值

位於該記憶體位置中的原始值。

需求

標頭檔: amp.h

**命名空間:**並行

請參閱

參考

Concurrency 命名空間 (C++ AMP)