Closed
Description
On the threads
branch, I want to be able to have a differently seeded RNG in each thread. I am using the threads with the @threads
macro to parallelize for loops. There doesn't seem to be a concept of a long running thread with global state.
I am guessing I should have a global array of RNG states, and every thread then just does something like rand(MT(threadid()))
. Is there a way I can do something like this for now? The @threads
only applies to the for loop and I would like to do some thread local setup before that?
This is not going to work well with a Cilk-style threading model in general - but I just want something that can work for now.