log_normal2_double#
-
nvmath.
device. random. log_normal2_double(state, mean, stddev)# Sample two doubles from log-normal distribution using the specified bit generator state.
- Parameters:
state – a state object corresponding to one of the bit generators.
mean – The mean value.
stddev – The standard deviation.
- Returns:
A value of type
nvmath.
.device. float64x2
Example
The
states
parameter of the kernel below should be an array of already initialized bit generator states. See the documentation ofnvmath.
for more details on how to create and initialize the bit generator states.device. random. init() >>> from numba import cuda >>> from nvmath.device import random >>> compiled_apis = random.Compile() >>> @cuda.jit(link=compiled_apis.files, extensions=compiled_apis.extension) ... def kernel(states, mean, stddev): ... i = cuda.grid(1) ... value = random.log_normal2_double(states[i], mean, stddev)