A random number generator.

Synopsis

Declared in <llvm/Support/RandomNumberGenerator.h>

class RandomNumberGenerator;

Description

Instances of this class should not be shared across threads. The seed should be set by passing the ‐rng‐seed=<uint64> option. Use Module::createRNG to create a new RNG instance for use with that module.

Type Aliases

Name

Description

result_type

Type of values produced by this generator.

Member Functions

Name

Description

operator()

Returns a random number in the range [0, Max).]

Static Member Functions

Name

Description

max

Returns the largest value this generator can produce.

min

Returns the smallest value this generator can produce.

Friends

Name

Description

llvm::Module

Top‐level container for LLVM IR objects in a translation unit.

Created with MrDocs