How about to use counter based random number generater like philox? [https://www.thesalmons.org/john/random123](https://www.thesalmons.org/john/random123)/
It works like a hash function. When you generate a random number, you make a unique number and pass it the function. You can create unique numbers using pixel coordinate, item index, loop counter, line number, etc. Pros: * deterministic as long as input numbers are deterministic. * Stateless. You can use existing variables to generate random numbers and it can reduce memory usage per thread. * Each random number generations can be executed in parallel as it doesn't need PRNG state update. Increase instruction-level parallelism. Cons: * It require more instructions to generate random number from non-random numbers. > I have found a parallel RNG scheme that allows reproducible multithreaded > result for those who wants to do parallel reproducible Monte-Carlo > simulations: Each RNGs generate different RNG streams but I think 2 RNG streams can be overlapped. All RNGs are seeded with unique random number in your code, but the state of one RNG right after being seeded can be same to the state of other RNG after several status update. (In that case, former RNG generate random number stream that is same to the one from later RNG after several state update) Probability of that happening can be very small, but it looks like [Birthday_problem](https://en.wikipedia.org/wiki/Birthday_problem). You need to use PRNG that have much longer period than number of random numbers actually used to avoid random number stream overlap.