Atomics Application Binary Interface
The mappings of programming languages’ atomic operations to the PTX ISA need to be implemented in a consistent manner across all programming languages that may concurrently access shared memory. The mapping from C++11 atomics for the CUDA architecture are proven correct in A Formal Analysis of the NVIDIA PTX Memory Consistency Model. The PTX ISA provides atomic memory operations and fences for acquire, release, acquire-release, and relaxed C++ memory ordering semantics. The PTX ABI for C++ sequentially consistent atomic operations is the following:
C or C++ or CUDA C++ API |
PTX ABI ISA mapping |
|---|---|
|
|
|
|
|
|
|
|