You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to https://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-extending.pdf one needs to add some forward declarations before loading Rcpp.h if one wants to extend Rcpp by custom as() and wrap() functions. That does not work for RViennaCL since the ViennaCL headers have been patched to already include Rcpp.h e.g.
. I think it would be sufficient to change all these includes to RcppCommon.h, but I have not tested it.
Alternatively, one could use a macro for defining the output stream, similar to what (Rcpp)Armadillo does. This macro could use std::cout by default but would be overwritten to Rcpp::Rcout in RViennaCL. This way this patch could be communicated upstream.
The text was updated successfully, but these errors were encountered:
@rstub thanks for the suggestions. This certainly gives me some ideas with a way to extend RViennaCL further. Once I get some time I will create a new branch and explore this.
This issue is motivated by https://stackoverflow.com/questions/49457018/using-rviennacl-for-matrix-multiplication/.
According to https://cran.r-project.org/web/packages/Rcpp/vignettes/Rcpp-extending.pdf one needs to add some forward declarations before loading
Rcpp.h
if one wants to extend Rcpp by customas()
andwrap()
functions. That does not work for RViennaCL since the ViennaCL headers have been patched to already includeRcpp.h
e.g.RViennaCL/inst/include/viennacl/ocl/backend.hpp
Line 29 in 93527ef
RcppCommon.h
, but I have not tested it.Alternatively, one could use a macro for defining the output stream, similar to what (Rcpp)Armadillo does. This macro could use
std::cout
by default but would be overwritten toRcpp::Rcout
in RViennaCL. This way this patch could be communicated upstream.The text was updated successfully, but these errors were encountered: