Algorithms Library

Algorithms Library#

2026-10-23

1 min read time

Applies to Linux and Windows

This page documents <cuda/std/algorithm>, which provides the C++ Standard Library algorithms for host and device code.

Header

Content

Availability

<cuda/std/algorithm>

Fundamental library algorithms

libhipcxx 3.4

Extensions#

  • All supported algorithms are available from C++17 onwards.

  • All supported algorithms are constexpr, except the allocating ones.

  • Because <cuda/std/algorithm> is a huge header with a considerable compile-time cost, we provide each algorithm through a minimal subheader named e.g <cuda/std/algorithm.find.h>

Restrictions#

  • Algorithms in namespace ranges are not yet supported.

  • Some sorting algorithms are not yet supported:

    • inplace_merge

    • nth_element

    • sort

    • stable_partition

    • stable_sort