LLVM  14.0.0git
Classes | Namespaces | Functions
Random.h File Reference
#include <random>
#include "llvm/Support/raw_ostream.h"
Include dependency graph for Random.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::ReservoirSampler< T, GenT >
 Randomly selects an item by sampling into a set with an unknown number of elements, which may each be weighted to be more likely choices. More...
 

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

template<typename T , typename GenT >
T llvm::uniform (GenT &Gen, T Min, T Max)
 Return a uniformly distributed random value between Min and Max. More...
 
template<typename T , typename GenT >
T llvm::uniform (GenT &Gen)
 Return a uniformly distributed random value of type T. More...
 
template<typename GenT , typename RangeT , typename ElT = std::remove_reference_t< decltype(*std::begin(std::declval<RangeT>()))>>
ReservoirSampler< ElT, GenT > llvm::makeSampler (GenT &RandGen, RangeT &&Items)
 
template<typename GenT , typename T >
ReservoirSampler< T, GenT > llvm::makeSampler (GenT &RandGen, const T &Item, uint64_t Weight)
 
template<typename T , typename GenT >
ReservoirSampler< T, GenT > llvm::makeSampler (GenT &RandGen)