YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
util.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <yaclib/config.hpp>
4
5#include <atomic>
6#include <random>
7
8namespace yaclib::detail {
9
10void SetSeed(std::uint32_t new_seed);
11
12std::uint32_t GetSeed();
13
14std::uint64_t GetRandNumber(std::uint64_t max);
15
16std::uint64_t GetRandCount();
17
18void ForwardToRandCount(std::uint64_t random_count);
19
20} // namespace yaclib::detail
std::uint64_t GetRandNumber(std::uint64_t max)
Definition util.cpp:22
void SetSeed(std::uint32_t new_seed)
Definition util.cpp:13
std::uint32_t GetSeed()
Definition util.cpp:18
std::uint64_t GetRandCount()
Definition util.cpp:29
void ForwardToRandCount(std::uint64_t random_count)
Definition util.cpp:37
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25