NVIDIA/cccl

CUDA Core Compute Libraries

What it solves

CUDA C++ developers often need high-performance parallel algorithms and standard library abstractions, but these were previously spread across multiple independent libraries. CCCL unifies these essential building blocks into a single repository to streamline development and make it easier to write safe, efficient, and portable CUDA code.

How it works

CCCL is a header-only collection that integrates three core libraries:

  • Thrust: A high-level C++ parallel algorithms library that provides productivity-enhancing interfaces and performance portability between GPUs and multicore CPUs.
  • CUB: A lower-level, CUDA-specific library focused on "speed-of-light" parallel algorithms, providing both device-wide and cooperative (block-wide/warp-wide) building blocks for custom kernels.
  • libcudacxx: The CUDA C++ Standard Library, which implements C++ Standard Library functionality for both host and device code and provides abstractions for CUDA-specific hardware features like atomics and synchronization primitives.

Who it’s for

CUDA C++ developers who need a standardized, high-performance set of tools for parallel computing on NVIDIA GPUs.

Highlights

  • Unified Repository: Combines Thrust, CUB, and libcudacxx for a more cohesive developer experience.
  • Header-Only: Simple integration into build systems without needing pre-compiled binaries.
  • Performance Portability: Enables code to run efficiently across different GPU architectures and, in some cases, multicore CPUs.
  • Broad Compatibility: Supports multiple CUDA Toolkit versions, host compilers (GCC, MSVC), and C++ dialects (C++17, C++20).

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project