Definition at line 91 of file CompressionTest.cpp.
folly::io::test::RandomDataHolder::RandomDataHolder |
( |
size_t |
sizeLog2 | ) |
|
|
explicit |
Definition at line 96 of file CompressionTest.cpp.
References folly::io::test::DataHolder::data_, i, folly::randomNumberSeed(), rng, seed, start, folly::pushmi::detail::t, threads, and uint32_t.
97 static constexpr
size_t numThreadsLog2 = 3;
98 static constexpr
size_t numThreads = size_t(1) << numThreadsLog2;
102 std::vector<std::thread>
threads;
103 threads.reserve(numThreads);
104 for (
size_t t = 0;
t < numThreads; ++
t) {
105 threads.emplace_back([
this, seed,
t, sizeLog2] {
106 std::mt19937
rng(seed +
t);
107 size_t countLog2 = sizeLog2 - numThreadsLog2;
108 size_t start = size_t(
t) << countLog2;
109 for (
size_t i = 0;
i < countLog2; ++
i) {
115 for (
auto&
t : threads) {
std::vector< std::thread::id > threads
std::unique_ptr< uint8_t[]> data_
uint32_t randomNumberSeed()
DataHolder(size_t sizeLog2)
The documentation for this class was generated from the following file: