mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
Improve initialization of random engines
This commit is contained in:
parent
668869ee85
commit
3c92d6a7c6
@ -144,8 +144,8 @@ void signal_generator_c::init()
|
||||
}
|
||||
}
|
||||
}
|
||||
std::default_random_engine e1(r());
|
||||
std::default_random_engine e2(r());
|
||||
//std::default_random_engine e1(r());
|
||||
//std::default_random_engine e2(r());
|
||||
std::uniform_int_distribution<int> uniform_dist(0, RAND_MAX);
|
||||
}
|
||||
|
||||
@ -277,6 +277,8 @@ int signal_generator_c::general_work(int noutput_items __attribute__((unused)),
|
||||
|
||||
work_counter_++;
|
||||
|
||||
std::default_random_engine e1(r());
|
||||
std::default_random_engine e2(r());
|
||||
unsigned int out_idx = 0;
|
||||
unsigned int i = 0;
|
||||
unsigned int k = 0;
|
||||
|
@ -150,8 +150,6 @@ private:
|
||||
std::vector<gr_complex> complex_phase_;
|
||||
unsigned int work_counter_{};
|
||||
std::random_device r;
|
||||
std::default_random_engine e1;
|
||||
std::default_random_engine e2;
|
||||
std::uniform_int_distribution<int> uniform_dist;
|
||||
std::normal_distribution<float> normal_dist;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user