.. _libcudacxx-extended-api-synchronization: Synchronization Primitives =========================== .. toctree:: :hidden: :maxdepth: 1 synchronization_primitives/atomic synchronization_primitives/atomic_ref synchronization_primitives/latch synchronization_primitives/barrier synchronization_primitives/counting_semaphore synchronization_primitives/binary_semaphore synchronization_primitives/pipeline .. rubric:: Atomics .. list-table:: :widths: 25 45 30 30 :header-rows: 1 * - **Header** - **Content** - **CCCL Availability** - **CUDA Toolkit Availability** * - :ref:`cuda::atomic ` - System-wide `std::atomic `_ objects and operations - libcu++ 1.0.0 / CCCL 2.0.0 - CUDA 10.2 * - :ref:`cuda::atomic_ref ` - System-wide `std::atomic_ref `_ objects and operations - libcu++ 1.7.0 / CCCL 2.0.0 - CUDA 11.6 .. rubric:: Latches .. list-table:: :widths: 25 45 30 30 :header-rows: 1 * - **Header** - **Content** - **CCCL Availability** - **CUDA Toolkit Availability** * - :ref:`cuda::latch ` - System-wide `std::latch `_ single-phase asynchronous thread coordination mechanism - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 .. rubric:: Barriers .. list-table:: :widths: 25 45 30 30 :header-rows: 1 * - **Header** - **Content** - **CCCL Availability** - **CUDA Toolkit Availability** * - :ref:`cuda::barrier ` - System wide `std::barrier `_ multi-phase asynchronous thread coordination mechanism - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 .. rubric:: Semaphores .. list-table:: :widths: 25 45 30 30 :header-rows: 1 * - **Header** - **Content** - **CCCL Availability** - **CUDA Toolkit Availability** * - :ref:`cuda::counting_semaphore ` - System wide `std::counting_semaphore `_ primitive for constraining concurrent access - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 * - :ref:`cuda::binary_semaphore ` - System wide `std::binary_semaphore `_ primitive for mutual exclusion - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 .. rubric:: Pipelines The pipeline library is included in the CUDA Toolkit, but is not part of the open source libcu++ distribution. .. list-table:: :widths: 25 45 30 30 :header-rows: 1 * - **Header** - **Content** - **CCCL Availability** - **CUDA Toolkit Availability** * - :ref:`cuda::pipeline ` - Coordination mechanism for sequencing asynchronous operations - libcu++ 1.2.0 / CCCL 2.0.0 - CUDA 11.1 * - :ref:`cuda::pipeline_shared_state ` - :ref:`cuda::pipeline ` shared state object - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 * - :ref:`cuda::pipeline_role ` - Defines producer/consumer role for a thread participating in a *pipeline* - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 * - :ref:`cuda::make_pipeline ` - Creates a :ref:`cuda::pipeline ` - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 * - :ref:`cuda::pipeline_consumer_wait_prior ` - Blocks the current thread until all operations committed up to a prior *pipeline stage* complete - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0 * - :ref:`cuda::pipeline_producer_commit ` - Binds operations previously issued by the current thread to a :ref:`cuda::barrier ` - libcu++ 1.1.0 / CCCL 2.0.0 - CUDA 11.0