共用方式為


atomic_exchange 函式 (C++ AMP)

設定目的位置的值的不可部分完成作業。

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

參數

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

  • _Value
    新值。

傳回值

目的位置的原始值。

需求

標頭檔: amp.h

**命名空間:**並行

請參閱

參考

Concurrency 命名空間 (C++ AMP)