cxtream  0.5.1
C++17 data pipeline with Python bindings.
random.hpp
1 /****************************************************************************
2  * cxtream library
3  * Copyright (c) 2017, Cognexa Solutions s.r.o.
4  * Author(s) Filip Matzner
5  *
6  * This file is distributed under the MIT License.
7  * See the accompanying file LICENSE.txt for the complete license agreement.
8  ****************************************************************************/
10 
11 #ifndef CXTREAM_CORE_UTILITY_RANDOM_HPP
12 #define CXTREAM_CORE_UTILITY_RANDOM_HPP
13 
14 #include <random>
15 
16 namespace cxtream::utility {
17 
20 static thread_local std::mt19937 random_generator{std::random_device{}()};
21 
22 } // namespace cxtream::utility
23 #endif
static thread_local std::mt19937 random_generator
Thread local pseudo-random number generator seeded by std::random_device.
Definition: random.hpp:20