作者celestialgod (攸蓝)
看板R_Language
标题[分享] RcppParallel
时间Fri Aug 7 10:35:20 2015
[关键字]: Rcpp, parallel computing
[出处]:
http://rcppcore.github.io/RcppParallel/#examples
[重点摘要]:
RcppParallel provides a complete toolkit for creating portable,
high-performance parallel algorithms without requiring direct manipulation of
operating system threads. RcppParallel includes:
Intel Thread Building Blocks (v4.3), a C++ library for task parallelism with
a wide variety of parallel algorithms and data structures (Windows, OS X,
Linux, and Solaris x86 only).
TinyThread, a C++ library for portable use of operating system threads.
RVector and RMatrix wrapper classes for safe and convenient access to R data
structures in a multi-threaded environment.
High level parallel functions (parallelFor and parallelReduce) that use Intel
TBB as a back-end on systems that support it and TinyThread on other
platforms.
我自己试做了用RcppArmadillo配上RcppParallel:
http://pastebin.com/KLwySJey
http://pastebin.com/PPhkVv6x (只有p小时会快,p变大会渐慢)
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.163.8.105
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1438914924.A.0B0.html
1F:推 cywhale: 3Q~ What's diff among RcppParallel, snow or foreach.. 08/07 12:31
snow, foreach是以R的function做为基础的平行设计
2F:推 cywhale: 翻看Rcpp parallel关键字文章看到Norm Matloff部落格 08/07 15:41
4F:→ cywhale: 也有一些Parallel package Rth?没有实作真的不知道差异 08/07 15:45
5F:→ cywhale: 只是题外话 anyway感谢版大介绍,慢慢再消化了.. 08/07 15:45
rth我记得是parallel some R functions...
有点久远不复记忆了XDD
※ 编辑: celestialgod (1.163.8.105), 08/07/2015 16:41:00