生成随机数:CPU vs GPU,目前胜出? [英] Generating random numbers: CPU vs GPU, which currently wins?

查看:278
本文介绍了生成随机数:CPU vs GPU,目前胜出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直致力于物理模拟,需要生成大量的随机数(如果你想要一个想法,至少10 ^ 13)。我一直在使用Mersenne twister的C ++ 11实现。我也读过这个相同的算法的GPU实现现在是Cuda库的一部分,并且GPU可以在这个任务非常有效;但我找不到明确的数字或​​基准比较。例如,与8核i7相比,最后一代的Nvidia卡在生成随机数时更有表现?如果是,价格范围是多少?价格范围是多少?



我想我的模拟可以从一个GPU生成一大堆随机数和CPU做


解决方案

一些比较可以在这里找到:
https://developer.nvidia.com/cuRAND


I've been working on a physics simulations requiring the generation of a large amount of random numbers (at least 10^13 if you want an idea). I've been using the C++11 implementation of the Mersenne twister. I've also read that GPU implementation of this same algorithm are now a part of Cuda libraries and that GPU can be extremely efficient at this task; but I couldn't find explicit numbers or a benchmark comparison. For example compared to an 8 cores i7, are Nvidia cards of the last generations more performant in generating random numbers? If yes, how much and in which price range?

I'm thinking that my simulation could gain from having a GPU generating a huge pile of random numbers and the CPU doing the rest.

解决方案

Some comparisons can be found here: https://developer.nvidia.com/cuRAND

这篇关于生成随机数:CPU vs GPU,目前胜出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆