search for: begin_rcpp

Displaying 8 results from an estimated 8 matches for "begin_rcpp".

2012 May 03
1
Setting up a windows system for rcpp
...-library/2.15/Rcpp/lib/x64/libRcpp.a >> LinkingTo : Rcpp CLINK_CPPFLAGS = -I"C:/Users/Owe/Documents/R/win-library/2.15/Rcpp/include" >> Program source : 1 : 2 : // includes from the plugin 3 : 4 : #include<Rcpp.h> 5 : 6 : 7 : #ifndef BEGIN_RCPP 8 : #define BEGIN_RCPP 9 : #endif 10 : 11 : #ifndef END_RCPP 12 : #define END_RCPP 13 : #endif 14 : 15 : using namespace Rcpp; 16 : 17 : 18 : // user includes 19 : 20 : 21 : // declarations 22 : extern "C" { 23 : SEXP file10bc7da0783e( SEX...
2011 Dec 05
1
RcppArmadillo compilation error: R CMD SHLIB returns status 1
...END OF EXAMPLE ### Executing this inside R, returned the following: ERROR(s) during compilation: source code errors or compiler configuration errors! Program source: 1: 2: // includes from the plugin 3: #include <RcppArmadillo.h> 4: #include <Rcpp.h> 5: 6: 7: #ifndef BEGIN_RCPP 8: #define BEGIN_RCPP 9: #endif 10: 11: #ifndef END_RCPP 12: #define END_RCPP 13: #endif 14: 15: using namespace Rcpp; 16: 17: 18: // user includes 19: 20: 21: // declarations 22: extern "C" { 23: SEXP file33765791( SEXP a, SEXP e) ; 24: } 25: 26: // definition...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...the "R side" as an R condition. For example : SEXP foo( ) { try { // user code here } catch( std::exception& __ex__){ forward_exception_to_r( __ex__ ) ; } // return something here } Alternatively, functions can enclose the user code with the macros BEGIN_RCPP and END_RCPP, which provides for a more compact way of programming. The function above could be written as follows using the macros: SEXP foo( ) { BEGIN_RCPP // user code here END_RCPP // return something here } The use of BEGIN_RCPP and END_RCPP is recommended to anticipate...
2010 May 17
0
Rcpp 0.8.0 on CRAN
...the "R side" as an R condition. For example : SEXP foo( ) { try { // user code here } catch( std::exception& __ex__){ forward_exception_to_r( __ex__ ) ; } // return something here } Alternatively, functions can enclose the user code with the macros BEGIN_RCPP and END_RCPP, which provides for a more compact way of programming. The function above could be written as follows using the macros: SEXP foo( ) { BEGIN_RCPP // user code here END_RCPP // return something here } The use of BEGIN_RCPP and END_RCPP is recommended to anticipate...
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
...ently I started developing a Rcpp package "OpenMPTest". Within that package I want to use OpenMP, as in the following code example: // header file #include <omp.h> using namespace Rcpp ; RcppExport SEXP testOpenMP( SEXP nThreads ) ; // cpp file SEXP testOpenMP( SEXP nThreads ) { BEGIN_RCPP NumericVector numberThreads = NumericVector( nThreads ); omp_set_num_threads( numberThreads(0) ); #pragma omp parallel { // Code inside this region runs in parallel. printf("Hello!\n"); } END_RCPP } As I am an absolute newbie with writing C++ extensions and have not...
2014 Mar 03
1
reference classes, LAZY_DUPLICATE_OK, and external pointers
...ternal.cpp */ SEXP merPredDCreate(SEXP Xs, SEXP Lambdat, SEXP LamtUt, SEXP Lind, SEXP RZX, SEXP Ut, SEXP Utr, SEXP V, SEXP VtV, SEXP Vtr, SEXP Xwts, SEXP Zt, SEXP beta0, SEXP delb, SEXP delu, SEXP theta, SEXP u0) { BEGIN_RCPP; merPredD *ans = new merPredD(Xs, Lambdat, LamtUt, Lind, RZX, Ut, Utr, V, VtV, Vtr, Xwts, Zt, beta0, delb, delu, theta, u0); return wrap(XPtr<merPredD>(ans, true)); END_RCPP; }
2011 Feb 06
5
Help with integrating R and c/c++
Hi, I have been using R for close to two years now and have grown quite comfortable with the language. I am presently trying to implement an optimization routine in R (Newton Rhapson). I have some R functions that calculate the gradient and hessian (pre requisite matrices) fairly efficiently. Now, I have to call this function iteratively until some convergance criterion is reached. I think the
2012 Nov 25
0
Problema de compilacion con Rcpp
...int)]+0x644): undefined reference to `_Unwind_SjLj_Resume' collect2: ld devolvió el estado de salida 1 ERROR(s) during compilation: source code errors or compiler configuration errors! Program source: 1: 2: // includes from the plugin 3: 4: #include <Rcpp.h> 5: 6: 7: #ifndef BEGIN_RCPP 8: #define BEGIN_RCPP 9: #endif 10: 11: #ifndef END_RCPP 12: #define END_RCPP 13: #endif 14: 15: using namespace Rcpp; 16: 17: 18: // user includes 19: 20: 21: // declarations 22: extern "C" { 23: SEXP filee241b5d23cd( SEXP x) ; 24: } 25: 26: // definition 27: 28: SEXP filee241b5d23cd...