cuda-samples/cpp/3_CUDA_Features/warpAggregatedAtomicsCG
Dheemanth 5443602d89
CUDA 13.4 samples update - v13.4-public
Release 13.4 of the CUDA Samples supported by CUDA Toolkit 13.4.
See Changelog for more information.
2026-09-09 17:07:08 -05:00
..
2026-05-13 17:13:18 -05:00

warpAggregatedAtomicsCG - Warp Aggregated Atomics using Cooperative Groups

Description

This sample demonstrates how using Cooperative Groups (CG) to perform warp aggregated atomics to single and multiple counters, a useful technique to improve performance when many threads atomically add to a single or multiple counters.

Key Concepts

Cooperative Groups, Atomic Intrinsics

Supported SM Architectures

Supported OSes

Linux, Windows

Supported CPU Architecture

x86_64, armv7l, aarch64

CUDA APIs involved

CUDA Runtime API

cudaMemcpy, cudaFree, cudaDeviceGetAttribute, cudaMemset, cudaMalloc

Prerequisites

Download and install the CUDA Toolkit for your corresponding platform.

References (for more details)