# moderngpu/moderngpu

Patterns and behaviors for GPU computing

Repository: https://github.com/moderngpu/moderngpu
Canonical: https://ross.abutalabs.com/products/moderngpu
Homepage: http://moderngpu.github.io/moderngpu
Language: C++
License: NOASSERTION
License Family: other
Last push: 2026-01-17T07:26:36+00:00

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

## Adoption (not part of the score)
Stars 1789, forks 283 (observed 2026-08-28T04:05:36.904810+00:00)

## What it is
moderngpu is a header-only C++ productivity library for general-purpose GPU computing built on CUDA. It provides accelerated primitives for irregularly parallel problems such as segmented reductions, scans, and load-balanced searches.

## Use cases
- run parallel algorithms on CUDA GPUs
- perform segmented reductions and scans on GPU
- load-balance irregular workloads across GPU threads
- accelerate sparse or variable-length data processing on GPU
- learn GPU computing patterns in C++

## When to choose
- you need high-performance CUDA primitives for irregular parallelism
- you want a header-only C++ GPU library with minimal setup
- you are writing CUDA applications needing scans, sorts, or segmented operations

## When to avoid
- you need GPU support for non-CUDA platforms like ROCm or Metal
- you want a general CPU parallel library
- you need extensive documentation and tutorials - the wiki is incomplete

## Facets
- artifact type: library
- maturity: active
- function: gpu-computing, concurrency, math
- domain: gpu-computing, performance
- platform: cpp, windows
- tags: cuda, header-only, parallel-computing, irregular-parallelism, segmented-reduction, algorithms, gpu, linux, macos

## Member repositories
- moderngpu/moderngpu (main) score 51

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:36.904810+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:23:19.296855+00:00, confidence not recorded.
  - readme: https://github.com/moderngpu/moderngpu (fetched 2026-08-28T04:05:36.904810+00:00, sha 9913e6de1fa1)
  - homepage: http://moderngpu.github.io/moderngpu (fetched 2026-08-29T11:02:11.144310+00:00, sha 50b61a51afdd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
