bwlewis / irlba

Fast truncated singular value decompositions
126 stars 17 forks source link

Make the irlba_c routines available for linking #37

Closed zdk123 closed 5 years ago

zdk123 commented 6 years ago

I would like to use your wonderful irlba in package I am working on, using constrained svd as a subroutine in some Rcpp / RcppArmadillo code. For large datasets, the overhead of calling R code from C++ overwhelms computation savings of irlba.

Would you consider making your C code available to be called by other C routines? I am following the advice in Romain Francois' stackoverflow post, and he links to relevant R docs. I am not as clear on how to go about using his hacky solution (capturing the irlba function pointer).

thanks!

zdk123 commented 6 years ago

As an addendum, I realize that the difficulty here is not necessarily in exposing the C routines but in maintaining integrity of the data/parameter construction if the user is trying to bypass the R interface. If the irlba maintainers predict this would cause too many headaches, feel free to ignore this request, otherwise I may start working on a PR.

bwlewis commented 6 years ago

Sorry for the latency, yes I think it's a good idea. Will review and merge later today.

bwlewis commented 5 years ago

closing this...a new CRAN release will be out with this very soon.