MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / Source_random_fast

Method Source_random_fast

src/Module/Source/Random/Source_random_fast.cpp:10–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9template<typename B>
10Source_random_fast<B>::Source_random_fast(const int K, const int seed)
11 : spu::module::Source<B>(K)
12 , mt19937(seed)
13 , mt19937_simd()
14{
15 const std::string name = "Source_random_fast";
16 this->set_name(name);
17 for (auto& t : this->tasks)
18 t->set_replicability(true);
19
20 mipp::vector<int> seeds(mipp::nElReg<int>());
21 for (auto i = 0; i < mipp::nElReg<int>(); i++)
22 seeds[i] = mt19937.rand();
23 mt19937_simd.seed(seeds.data());
24}
25
26template<typename B>
27Source_random_fast<B>*

Callers

nothing calls this directly

Calls 2

randMethod · 0.80
seedMethod · 0.45

Tested by

no test coverage detected