hiprandcreategenerator Interface Reference

hiprandcreategenerator Interface Reference#

HIPFORT API Reference: hipfort_hiprand::hiprandcreategenerator Interface Reference
hipfort_hiprand::hiprandcreategenerator Interface Reference

Creates a new random number generator. More...

Public Member Functions

integer(kind(hiprand_status_success)) function hiprandcreategenerator_ (generator, rng_type)
 

Detailed Description

Creates a new random number generator.

Creates a new random number generator of type rng_type, and returns it in generator. That generator will use GPU to create random numbers.

Values for rng_type are:

  • HIPRAND_RNG_PSEUDO_DEFAULT
  • HIPRAND_RNG_PSEUDO_XORWOW
  • HIPRAND_RNG_PSEUDO_MRG32K3A
  • HIPRAND_RNG_PSEUDO_MTGP32
  • HIPRAND_RNG_PSEUDO_MT19937
  • HIPRAND_RNG_PSEUDO_PHILOX4_32_10
  • HIPRAND_RNG_QUASI_DEFAULT
  • HIPRAND_RNG_QUASI_SOBOL32
  • HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL32
  • HIPRAND_RNG_QUASI_SOBOL64
  • HIPRAND_RNG_QUASI_SCRAMBLED_SOBOL64
Parameters
generator- Pointer to generator
rng_type- Type of random number generator to create
Returns
  • HIPRAND_STATUS_ALLOCATION_FAILED, if memory allocation failed
  • HIPRAND_STATUS_INITIALIZATION_FAILED if there was a problem setting up the GPU
  • HIPRAND_STATUS_VERSION_MISMATCH if the header file version does not match the dynamically linked library version
  • HIPRAND_STATUS_TYPE_ERROR if the value for rng_type is invalid
  • HIPRAND_STATUS_NOT_IMPLEMENTED if generator of type rng_type is not implemented yet
  • HIPRAND_STATUS_SUCCESS if generator was created successfully

Member Function/Subroutine Documentation

◆ hiprandcreategenerator_()

integer(kind(hiprand_status_success)) function hipfort_hiprand::hiprandcreategenerator::hiprandcreategenerator_ ( type(c_ptr)  generator,
integer(kind(hiprand_rng_test)), value  rng_type 
)

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