This page contains proposed changes for a future release of ROCm. Read the latest Linux release of ROCm documentation for your production environments.

hiprandgenerateuniformdouble Interface Reference

hiprandgenerateuniformdouble Interface Reference#

HIPFORT API Reference: hipfort_hiprand::hiprandgenerateuniformdouble Interface Reference
hipfort_hiprand::hiprandgenerateuniformdouble Interface Reference

Generates uniformly distributed double-precision floating-point values. More...

Public Member Functions

integer(kind(hiprand_status_success)) function hiprandgenerateuniformdouble_ (generator, output_data, n)
 

Detailed Description

Generates uniformly distributed double-precision floating-point values.

Generates n uniformly distributed 64-bit double-precision floating-point values and saves them to output_data.

Generated numbers are between 0.0 and 1.0, excluding 0.0 and including 1.0.

Parameters
generator- Generator to use
output_data- Pointer to memory to store generated numbers
n- Number of floats to generate

Note: When generator is of type: HIPRAND_RNG_PSEUDO_MRG32K3A, HIPRAND_RNG_PSEUDO_MTGP32, or HIPRAND_RNG_QUASI_SOBOL32, then the returned double values are generated from only 32 random bits each (one unsigned int value per one generated double).

Returns
  • HIPRAND_STATUS_NOT_INITIALIZED if the generator was not initialized
  • HIPRAND_STATUS_LAUNCH_FAILURE if generator failed to launch kernel
  • HIPRAND_STATUS_LENGTH_NOT_MULTIPLE if n is not a multiple of the dimension of used quasi-random generator
  • HIPRAND_STATUS_SUCCESS if random numbers were successfully generated

Member Function/Subroutine Documentation

◆ hiprandgenerateuniformdouble_()

integer(kind(hiprand_status_success)) function hipfort_hiprand::hiprandgenerateuniformdouble::hiprandgenerateuniformdouble_ ( type(c_ptr), value  generator,
type(c_ptr), value  output_data,
integer(c_size_t), value  n 
)

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