<cuda/std/random>#

2026-10-23

1 min read time

Applies to Linux and Windows

This page documents <cuda/std/random>, which provides C++ Standard Library random number engines, distributions and utilities for host and device code.

Provided functionalities#

Random number engines:

Note

cuda::pcg64 is provided in the non-standard <cuda/random> header. See cuda::pcg64.

Random number distributions:

Utilities:

Note

cuda::std::seed_seq should be used exclusively on host or exclusively on device. Do not share the same seed_seq instance between host and device code.

The following engines or distributions are not implemented as they are not convenient or practical to implement in GPU device code, either due to dynamic memory allocations or large state sizes.

Not supported#