CUDA 上的二项式随机变量生成器
我的问题如下:
我需要使用 CUDA 上的二项式分布并行生成大量随机数。 CUDA 上的所有随机数生成器都基于均匀分布(据我所知),这也很有用,因为所有二项式分布的算法都需要使用均匀变量。
CUDA 上是否有用于二项式随机变量生成的库或实现?我看到http://acs.lbl.gov/~hoschek/colt中有JAVA / ,但是它使用了非常复杂的算法来并行化。然而,给定 B(N,p) 之后的二项式变量,有更简单的算法,复杂度为 O(N),但这对我来说很糟糕,因为 N 可能很大(大约 2^32,整数的最大值)。
我将不胜感激任何帮助。多谢。 米格尔
P.S.:抱歉我的英语不好:)
My problem is the following:
I need to generate lot of random numbers in parallel using Binomial Distribution on CUDA. All the Random Number Generators on CUDA are based on the Uniform Distribution (as far I know), what is also useful since all the algorithms for Binomial Distribution needs to use Uniform variates.
Is there any library or implementation for binomial random variate generation on CUDA? I see that there are for JAVA in http://acs.lbl.gov/~hoschek/colt/ , but it uses a very complicated algorithm to be parallelized. However, given a binomial variate following B(N,p), there are simpler algorithms with order of complexity O(N), but it is bad for me because N can be large (around 2^32, maximum for a Integer).
I would appreciate any help. Thanks a lot.
Miguel
P.S.: sorry for my bad english :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个有趣的问题,我会通过使用以前的解决方案并使其适应 CUDA 的工作方式来解决这个问题。CiteSeerX
是您可以获取 pdf 文件以进行可能有帮助的研究的地方。
http://citeseerx.ist.psu.edu/
你看过 MDGPU 了吗?这是在SO的另一个问题中提出的
http://www-old.amolf.nl/~vanmeel/mdgpu/ licence.html
NAG 还有一个库可能会有所帮助:
http://www.nag.co.uk/numeric/gpus/
That's an interesting problem, I would attack the problem by using a previous solution and adapting it to the way CUDA works..
CiteSeerX is where you can get hold of pdf's for research that might help..
http://citeseerx.ist.psu.edu/
Did you take a look at MDGPU? It was suggested in another question in SO
http://www-old.amolf.nl/~vanmeel/mdgpu/licence.html
Also NAG have a library which may help:
http://www.nag.co.uk/numeric/gpus/