-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Substitute openMP using RcppParallel #7
Comments
I definitely do want to make this change, but I want to understand RcppParallel better beforehand. If you have any resources on RcppParallel you can point me to, or in general resources on approaches to parallelization that run nicely on all platforms, I would love to see them. |
I usually work with |
Wow yes I would loooove PRs. Be sure to add yourself as a contributor to
the package in the PR!
…On Thu, Dec 17, 2020 at 10:04 PM Yunyi Shen ***@***.***> wrote:
I definitely do want to make this change, but I want to understand
RcppParallel better beforehand. If you have any resources on RcppParallel
you can point me to, or in general resources on approaches to
parallelization that run nicely on all platforms, I would love to see them.
I usually work with RcppParallel, which works well across platforms and
also work well together with armadillo (but not very well directly with
base Rcpp classes, you need to use RcppParallel's accessors classes).
It's great to start with the documentation
<http://rcppcore.github.io/RcppParallel/>. This
<https://stackoverflow.com/questions/26234055/cohabitation-of-rcpparmadillo-and-rcppparallel>
StackOverflow helped me a lot before. I made a branch here
<https://github.com/YunyiShen/LRMF3/tree/master/src> that substituted
opneMP with RcppParallel for RMLF3 and here
<https://github.com/YunyiShen/fastadi/tree/master/src> for fastadi. Let
me know if you want a PR to see them locally.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADTBG26ZD2ERGDZKO7VB47DSVLIETANCNFSM4URLUADA>
.
|
Moving compiled code to |
Thanks for the package!
It seems not all users have openMP installed and it cannot be done within R. Plus the omp support is not yet stable for R>4.0 (e.g. here). RcppParallel library seems to be an alternative? For example, the
rowSums_svd_like_impl
function in/src/rowSums.cpp
can be written aswith an R wrapper:
This alternative seemed to work on my branch. Minor changes need to be made to import RcppParallel
The text was updated successfully, but these errors were encountered: