LLVM  4.0.0
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::RandomNumberGenerator Class Reference

A random number generator. More...

#include <RandomNumberGenerator.h>

Public Types

using result_type = generator_type::result_type
 

Public Member Functions

result_type operator() ()
 Returns a random number in the range [0, Max). More...
 

Static Public Member Functions

static constexpr result_type min ()
 
static constexpr result_type max ()
 

Friends

class Module
 

Detailed Description

A random number generator.

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.

Definition at line 33 of file RandomNumberGenerator.h.

Member Typedef Documentation

using llvm::RandomNumberGenerator::result_type = generator_type::result_type

Definition at line 42 of file RandomNumberGenerator.h.

Member Function Documentation

static constexpr result_type llvm::RandomNumberGenerator::max ( )
inlinestatic

Definition at line 48 of file RandomNumberGenerator.h.

static constexpr result_type llvm::RandomNumberGenerator::min ( )
inlinestatic

Definition at line 47 of file RandomNumberGenerator.h.

References fuzzer::min().

RandomNumberGenerator::result_type RandomNumberGenerator::operator() ( )

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

Definition at line 60 of file RandomNumberGenerator.cpp.

Friends And Related Function Documentation

friend class Module
friend

Definition at line 63 of file RandomNumberGenerator.h.


The documentation for this class was generated from the following files: