# rocRAND User Guide

Contents:

- 1. Installation
  - 1.1. Introduction
  - 1.2. Prebuilt Packages
  - 1.3. Building rocRAND From Source
    - 1.3.1. Obtaining Sources
    - 1.3.2. Building The Library
    - 1.3.3. Building With CMake
  - 1.4. Building the Python API Wrapper
    - 1.4.1. Requirements
    - 1.4.2. Installing
- 2. Programmer’s Guide
  - 2.1. Generator types
  - 2.2. Ordering
    - 2.2.1. cuRAND Compatibility
- 3. C/C++ API Reference
  - 3.1. Device Functions
    - `rocrand_make_state_mtgp32()`
    - `rocrand_make_constant()`
    - `rocrand_device`
  - 3.2. C Host API
    - `rocrand_status`
    - `rocrand_rng_type`
    - `rocrand_ordering`
  - 3.3. C++ Host API Wrapper
    - `philox4x32_10`
    - `xorwow`
    - `mrg31k3a`
    - `mrg32k3a`
    - `mtgp32`
    - `lfsr113`
    - `mt19937`
    - `threefry2x32`
    - `threefry2x64`
    - `threefry4x32`
    - `threefry4x64`
    - `sobol32`
    - `scrambled_sobol32`
    - `sobol64`
    - `scrambled_sobol64`
    - `default_random_engine`
    - `random_device`
    - `version()`
    - `error`
    - `uniform_int_distribution`
    - `uniform_real_distribution`
    - `normal_distribution`
    - `lognormal_distribution`
    - `poisson_distribution`
    - `philox4x32_10_engine`
    - `xorwow_engine`
    - `mrg31k3p_engine`
    - `mrg32k3a_engine`
    - `mtgp32_engine`
    - `lfsr113_engine`
    - `mt19937_engine`
    - `sobol32_engine`
    - `scrambled_sobol32_engine`
    - `sobol64_engine`
    - `scrambled_sobol64_engine`
    - `threefry2x32_20_engine`
    - `threefry2x64_20_engine`
    - `threefry4x32_20_engine`
    - `threefry4x64_20_engine`
- 4. Python API Reference
  - 4.1. class PRNG
    - `PRNG`
  - 4.2. class QRNG
    - `QRNG`
  - 4.3. Exceptions
    - `RocRandError`
    - `HipError`
  - 4.4. Utilities
    - `DeviceNDArray`
    - `empty()`
    - `get_version()`

## Overview

The rocRAND project provides functions that generate pseudo-random and quasi-random numbers.

The rocRAND library is implemented in the HIP programming language and optimised for AMD’s latest discrete GPUs. It is designed to run on top of AMD’s Radeon Open Compute ROCm runtime, but it also works on CUDA enabled GPUs. Additionally, the project includes a wrapper library called hipRAND which allows users to easily port CUDA applications that use cuRAND library to the HIP layer. In ROCm environment hipRAND uses rocRAND, however in CUDA environment cuRAND is used instead.

### Indices and tables

- Index

- Search Page