45#ifndef __BASE_RANDOM_HH__
46#define __BASE_RANDOM_HH__
80 void init(uint32_t
s);
89 typename std::enable_if_t<std::is_integral_v<T>, T>
93 std::uniform_int_distribution<T>
dist;
100 template <
typename T>
101 typename std::enable_if_t<std::is_floating_point_v<T>, T>
105 std::uniform_real_distribution<T>
dist;
111 template <
typename T>
112 typename std::enable_if_t<std::is_integral_v<T>, T>
115 std::uniform_int_distribution<T>
dist(min, max);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::enable_if_t< std::is_floating_point_v< T >, T > random()
Basic support for object serialization.
std::enable_if_t< std::is_integral_v< T >, T > random(T min, T max)
std::enable_if_t< std::is_integral_v< T >, T > random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
const FlagsType init
This Stat is Initialized.
const FlagsType dist
Print the distribution.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut