rocrand_set_seed Interface Reference

rocrand_set_seed Interface Reference#

HIPFORT API Reference: hipfort_rocrand::rocrand_set_seed Interface Reference
hipfort_rocrand::rocrand_set_seed Interface Reference

Sets the seed of a pseudo-random number generator. More...

Public Member Functions

integer(kind(rocrand_status_success)) function rocrand_set_seed_ (generator, seed)
 

Detailed Description

Sets the seed of a pseudo-random number generator.

Sets the seed of the pseudo-random number generator.

  • This operation resets the generator's internal state.
  • This operation does not change the generator's offset.

For a MRG32K3a generator seed value can't be zero. If seed is equal zero and generator's type is ROCRAND_RNG_PSEUDO_MRG32K3A, value 12345 is used as a seed instead.

Parameters
generator- Pseudo-random number generator
seed- New seed value
Returns
  • ROCRAND_STATUS_NOT_CREATED if the generator wasn't created
  • ROCRAND_STATUS_TYPE_ERROR if the generator is a quasi-random number generator
  • ROCRAND_STATUS_SUCCESS if seed was set successfully

Member Function/Subroutine Documentation

◆ rocrand_set_seed_()

integer(kind(rocrand_status_success)) function hipfort_rocrand::rocrand_set_seed::rocrand_set_seed_ ( type(c_ptr), value  generator,
integer(c_long_long), value  seed 
)

The documentation for this interface was generated from the following file: