katgpucbf.curand_helpers module

Helpers to initialise random state with curand.

class katgpucbf.curand_helpers.RandomStateBuilder(context: <Mock name='mock.Context' id='139785445150288'>)[source]

Bases: object

Build array of initialised random states for curand.

make_states(shape: tuple[int, ...], seed: int, sequence_first: int, sequence_step: int = 1, offset: int = 0) DeviceArray[source]

Create a multi-dimensional array of random states.

This method is not particularly efficient. It’s intended to be used just during startup, after which the random states will be persisted in global memory and reused.