summaryrefslogtreecommitdiff
path: root/gr-analog/lib/fastnoise_source_X_impl.h.t
diff options
context:
space:
mode:
authorMarcus Müller <mueller@kit.edu>2018-02-16 18:05:52 +0100
committerMarcus Müller <marcus.mueller@ettus.com>2018-03-30 16:50:32 +0200
commitc31f52882a7eefda683cec42e65a95fd2127f780 (patch)
tree4fb7501e2a992de498b77b904ffeea12544a98ea /gr-analog/lib/fastnoise_source_X_impl.h.t
parentc4af98a8c9a1a1189d650370ddf50f05a0112c94 (diff)
Converted fastnoise_source from rand() to xoroshiro128+
This solves the issue with libc rand() relying on global (not thread-local!) state and thus not being suited for multithreaded applications. This fixes #1542.
Diffstat (limited to 'gr-analog/lib/fastnoise_source_X_impl.h.t')
-rw-r--r--gr-analog/lib/fastnoise_source_X_impl.h.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/gr-analog/lib/fastnoise_source_X_impl.h.t b/gr-analog/lib/fastnoise_source_X_impl.h.t
index 8ad1e4f8fe..5bea010e62 100644
--- a/gr-analog/lib/fastnoise_source_X_impl.h.t
+++ b/gr-analog/lib/fastnoise_source_X_impl.h.t
@@ -38,6 +38,7 @@ namespace gr {
float d_ampl;
gr::random d_rng;
std::vector<@TYPE@> d_samples;
+ uint64_t d_state[2];
public:
@IMPL_NAME@(noise_type_t type, float ampl, long seed, long samples);