there is an example of using OpenMP for this:
http://dirk.eddelbuettel.com/code/rcpp/html/OpenMP_2OpenMPandInline_8r-example.html
thanks Dirk :-)
On Thu, Feb 14, 2013 at 3:43 AM, Zhao Yang wrote:
> Hello,
>
> Firstly, I would like to thank the develops of Rcpp for this tool.
>
> Then, here is
Hello,
Firstly, I would like to thank the develops of Rcpp for this tool.
Then, here is the function:
-
code<-'
NumericVector my_id(id);
NumericMatrix my_link(link);
NumericVector lst(1000);
for (int i=0;i<1000;i++){
for (int j=0;j<1000;j++){
if (my_link(my_id[i],my_i