阅读背景:

种子并行伪随机数生成器的好方法是什么?

来源:互联网 

The PRNG I wrote has a period of 2^64. When I use a spinlock to protect it from 4 threads, It runs twice slower than when there is a single thread. A mutex appears better at making things slower. So I decided to have separate generators per thread, but the problem here is that when the seeds are too close, The same series of random numbers will appear again and again each in a different thread. I'm not 100% sure how bad this will affect my simulation, but I'd like to avoid having very closely seeded PRNGs.The PRNG I wrote has a period of 2^64. When I u




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: