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 an MRG32K3a or MRG31K3p generator the seed value can't be zero. If seed is equal to zero and generator's type is ROCRAND_RNG_PSEUDO_MRG32K3A or ROCRAND_RNG_PSEUDO_MRG31K3P, value 12345 is used as seed instead.
For a LFSR113 generator seed values must be larger than 1, 7, 15,
- The
seedupper and lower 32 bits used as first and second seed value. If those values smaller than 2 and/or 8, those are increased with 1 and/or 7.
- 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_int64_t), value | seed | ||
| ) |
The documentation for this interface was generated from the following file: