Parallel mapM on Repa arrays

前端 未结 2 1624
情书的邮戳
情书的邮戳 2021-02-01 11:41

In my recent work with Gibbs sampling, I\'ve been making great use of the RVar which, in my view, provides a near ideal interface to random number generation. Sadl

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-01 12:16

    It's probably not a good idea to do this due to inherently sequential nature of PRNGs. Instead, you might want to transition your code as follows:

    1. Declare an IO function (main, or what have you).
    2. Read as many random numbers as you need.
    3. Pass the (now pure) numbers onto your repa functions.

提交回复
热议问题