Synchronization Primitives#
2026-10-01
3 min read time
This page covers the synchronization primitives extended API, including thread-scoped atomics, latches, barriers, semaphores, and pipelines for coordinating host and device threads.
Atomics
System-wide std::atomic objects and operations |
libhipcxx 1.0.0 / CCCL 2.0.0 / CUDA 10.2 |
|
System-wide std::atomic_ref objects and operations |
libhipcxx 1.7.0 / CCCL 2.0.0 / CUDA 11.6 |
Latches
System-wide std::latch single-phase asynchronous thread coordination mechanism |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
Barriers
System wide std::barrier multi-phase asynchronous thread coordination mechanism |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
Semaphores
System wide std::counting_semaphore primitive for constraining concurrent access |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
|
System wide std::binary_semaphore primitive for mutual exclusion |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
Pipelines
The pipeline library is included in the CUDA Toolkit, but is not part of the open source libhipcxx distribution.
Coordination mechanism for sequencing asynchronous operations |
libhipcxx 1.2.0 / CCCL 2.0.0 / CUDA 11.1 |
|
cuda::pipeline shared state object |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
|
Defines producer/consumer role for a thread participating in a pipeline |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
|
Creates a cuda::pipeline |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
|
Blocks the current thread until all operations committed up to a prior pipeline stage complete |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |
|
Binds operations previously issued by the current thread to a cuda::barrier |
libhipcxx 1.1.0 / CCCL 2.0.0 / CUDA 11.0 |