We introduce the R package clrng which leverages the gpuR package and is able to generate random numbers in parallel on a Graphics Processing Unit (GPU) with the clRNG (OpenCL) library. Parallel processing with GPU's can speed up computationally intensive tasks, which when combined with R, it can largely improve R's downsides in terms of slow speed, memory usage and computation mode. clrng enables reproducible research by setting random initial seeds for streams on GPU and CPU, and can thus accelerate several types of statistical simulation and modelling. The random number generator in clrng guarantees independent parallel samples even when R is used interactively in an ad-hoc manner, with sessions being interrupted and restored. This package is portable and flexible, developers can use its random number generation kernel for various other purposes and applications.
翻译:我们引入了 R 包包, 利用 gpuR 软件包, 能够在图形处理股( GPU) 和 CLRNG ( OpenCL) 库中平行生成随机数字。 与 GPU 的平行处理可以加速计算密集的任务, 如果与 R 组合在一起, 它可以在慢速、 记忆使用和计算模式方面大大改善 R 的下行。 包能通过在 GPU 和 CPU 上设置随机初始种子来进行可复制的研究, 从而可以加速多种类型的统计模拟和建模。 即使 R 被自动交互使用, 并且会话被中断和 恢复, 随机数字生成器也能保证独立平行的样本 。 这个软件包既可移动又灵活, 开发者也可以将其随机数字生成的内核圈用于其他用途和应用 。