UniformBits64

Generates uniformly distributed bits in 64-bit chunks.

Syntax

Fortran:

status = virnguniformbits64( method, stream, n, r )

C:

status = viRngUniformBits64( method, stream, n, r );

Include Files

The FORTRAN 77 interfaces are specified in the mkl_vsl.f77 include file, the Fortran 90 interfaces are specified in the mkl_vsl.f90 include file, and the C interfaces are specified in the mkl_vsl_functions.h include file.

Input Parameters

Name

Type

Description

method

FORTRAN 77: INTEGER

Fortran 90: INTEGER, INTENT(IN)

C: const int

Generation method; the specific value is VSL_RNG_METHOD_UNIFORMBITS64_STD

stream

FORTRAN 77: INTEGER*4 stream(2)

Fortran 90: TYPE (VSL_STREAM_STATE), INTENT(IN)

C: VSLStreamStatePtr

Fortran: Descriptor of the stream state structure.

C: Pointer to the stream state structure

n

FORTRAN 77: INTEGER

Fortran 90: INTEGER, INTENT(IN)

C: const int

Number of random values to be generated

Output Parameters

Name

Type

Description

r

FORTRAN 77: INTEGER*8

Fortran 90: INTEGER (KIND=8), INTENT(OUT)

C: unsigned long long*

Fortran: Vector of n 64-bit random integer numbers with uniform bit distribution.

C: Vector of n 64-bit random integer numbers with uniform bit distribution.

Description

The UniformBits64 function generates uniformly distributed bits in 64-bit chunks. Unlike UniformBits, which provides the output of underlying integer recurrence and does not guarantee uniform distribution across bits, UniformBits64 is designed to ensure each bit in the 64-bit chunk is uniformly distributed. See VSL Notes for details.

Return Values

VSL_ERROR_OK, VSL_STATUS_OK

Indicates no error, execution is successful.

VSL_ERROR_NULL_PTR

stream is a NULL pointer.

VSL_RNG_ERROR_BAD_STREAM

stream is not a valid random stream.

VSL_RNG_ERROR_BRNG_NOT_SUPPORTED

BRNG is not supported by the function.

VSL_RNG_ERROR_NO_NUMBERS

Callback function for an abstract BRNG returns 0 as the number of updated entries in a buffer.

VSL_RNG_ERROR_QRNG_PERIOD_ELAPSED

Period of the generator has been exceeded.


Submit feedback on this help topic

Copyright © 1994 - 2011, Intel Corporation. All rights reserved.