From 14f7b47f2c2315d0de5e52d31c57fe07a15d08ad Mon Sep 17 00:00:00 2001 From: Julian T Date: Fri, 12 Feb 2021 23:33:50 +0100 Subject: Implement multithreaded compiling of tiles --- src/sample/uniform.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sample/uniform.rs') diff --git a/src/sample/uniform.rs b/src/sample/uniform.rs index 2cd3156..c144f27 100644 --- a/src/sample/uniform.rs +++ b/src/sample/uniform.rs @@ -30,4 +30,10 @@ impl Sampler for UniformSampler { fn get_sample(&mut self) -> Float { self.d.sample(&mut self.r) } + + fn clone_and_seed(&mut self) -> Box { + let mut n = self.clone(); + n.r = Pcg32::seed_from_u64(self.r.next_u64()); + Box::new(n) + } } -- cgit v1.2.3