# NVIDIA/cub

[ARCHIVED] Cooperative primitives for CUDA C++. See https://github.com/NVIDIA/cccl

Repository: https://github.com/NVIDIA/cub
Canonical: https://ross.abutalabs.com/products/cub
Language: Cuda
License: BSD-3-Clause
License Family: permissive
Topics: cuda, nvidia-hpc-sdk, cub, gpu, cpp, cpp11, cpp14, cpp17, cpp20, cxx, cxx11, cxx14, cxx17, cxx20, algorithms, nvidia
Archived: true
Last push: 2023-10-09T17:44:21+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4947, "days_push": 1059, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1842, forks 464 (observed 2026-08-28T04:05:43.176024+00:00)

## What it is
CUB is a header-only C++ library providing reusable cooperative primitives (sort, scan, reduction, histogram) for device-wide, block-wide, and warp-wide layers of the CUDA programming model. It is now archived and maintained as part of NVIDIA's unified CCCL repository.

## Use cases
- sort large arrays on the GPU with CUDA
- compute parallel prefix scans in CUDA kernels
- block-wide and warp-wide collective reductions
- build GPU histograms efficiently
- reuse high-performance CUDA algorithm primitives in custom kernels

## When to choose
- you need battle-tested parallel primitives for CUDA C++ kernels
- you want device-, block-, or warp-level algorithms without writing them yourself
- you are already using the CUDA Toolkit or NVIDIA HPC SDK where CUB is bundled

## When to avoid
- you are starting a new project - use the successor nvidia/cccl (CUDA C++ Core Libraries) instead
- you need CPU-only parallel algorithms
- you need a runtime library rather than header-only templates

## Facets
- artifact type: library
- maturity: maintenance
- function: concurrency, developer-tools
- domain: gpu-computing, developer-tools
- platform: cpp
- tags: cuda, gpu-computing, parallel-algorithms, header-only, archived, nvidia, algorithms, gpu

## Member repositories
- NVIDIA/cub (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:43.176024+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:17:58.757678+00:00, confidence not recorded.
  - readme: https://github.com/NVIDIA/cub (fetched 2026-08-28T04:05:43.176024+00:00, sha 148caebc08a5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
