Skip to contents

Creates an initial RNG state from a seed. This state is required by all random sampling functions and is updated after each call.

Usage

nv_rng_state(seed)

Arguments

seed

(integer(1))
Seed value.

Value

nv_tensor of dtype ui64 and shape (2).

See also

Examples

jit_eval({
  state <- nv_rng_state(42L)
  state
})
#> AnvilTensor
#>  42
#>   0
#> [ CPUui64{2} ]