how to make each thread use its own RNG in C++11

前端 未结 2 528
臣服心动
臣服心动 2021-02-02 03:59

I\'m using the new random number generators in in C++11. Although there are varying opinions, from this thread it seems that the majority believe they are not thread safe. As a

2条回答
  •  一个人的身影
    2021-02-02 04:21

    I would refrain from using random seeding. It might end up with overlapping streams. This will eventually affect the final statistic.

    I would suggest some tried and tested solution like this

提交回复
热议问题