|
6 | 6 | using namespace Rcpp; |
7 | 7 |
|
8 | 8 | #ifdef RCPP_USE_GLOBAL_ROSTREAM |
9 | | -Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); |
| 9 | +Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); |
10 | 10 | Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); |
11 | 11 | #endif |
12 | 12 |
|
13 | 13 | // add_two_rcpp_ |
14 | 14 | NumericMatrix add_two_rcpp_(NumericMatrix a, NumericMatrix b); |
15 | 15 | RcppExport SEXP _Rcppbenchmark_add_two_rcpp_(SEXP aSEXP, SEXP bSEXP) { |
16 | | - BEGIN_RCPP |
17 | | - Rcpp::RObject rcpp_result_gen; |
18 | | - Rcpp::RNGScope rcpp_rngScope_gen; |
19 | | - Rcpp::traits::input_parameter<NumericMatrix>::type a(aSEXP); |
20 | | - Rcpp::traits::input_parameter<NumericMatrix>::type b(bSEXP); |
21 | | - rcpp_result_gen = Rcpp::wrap(add_two_rcpp_(a, b)); |
22 | | - return rcpp_result_gen; |
23 | | - END_RCPP |
| 16 | +BEGIN_RCPP |
| 17 | + Rcpp::RObject rcpp_result_gen; |
| 18 | + Rcpp::RNGScope rcpp_rngScope_gen; |
| 19 | + Rcpp::traits::input_parameter< NumericMatrix >::type a(aSEXP); |
| 20 | + Rcpp::traits::input_parameter< NumericMatrix >::type b(bSEXP); |
| 21 | + rcpp_result_gen = Rcpp::wrap(add_two_rcpp_(a, b)); |
| 22 | + return rcpp_result_gen; |
| 23 | +END_RCPP |
24 | 24 | } |
25 | 25 | // add_four_rcpp_ |
26 | | -NumericMatrix add_four_rcpp_(NumericMatrix a, NumericMatrix b, NumericMatrix c, |
27 | | - NumericMatrix d); |
28 | | -RcppExport SEXP _Rcppbenchmark_add_four_rcpp_(SEXP aSEXP, SEXP bSEXP, SEXP cSEXP, |
29 | | - SEXP dSEXP) { |
30 | | - BEGIN_RCPP |
31 | | - Rcpp::RObject rcpp_result_gen; |
32 | | - Rcpp::RNGScope rcpp_rngScope_gen; |
33 | | - Rcpp::traits::input_parameter<NumericMatrix>::type a(aSEXP); |
34 | | - Rcpp::traits::input_parameter<NumericMatrix>::type b(bSEXP); |
35 | | - Rcpp::traits::input_parameter<NumericMatrix>::type c(cSEXP); |
36 | | - Rcpp::traits::input_parameter<NumericMatrix>::type d(dSEXP); |
37 | | - rcpp_result_gen = Rcpp::wrap(add_four_rcpp_(a, b, c, d)); |
38 | | - return rcpp_result_gen; |
39 | | - END_RCPP |
| 26 | +NumericMatrix add_four_rcpp_(NumericMatrix a, NumericMatrix b, NumericMatrix c, NumericMatrix d); |
| 27 | +RcppExport SEXP _Rcppbenchmark_add_four_rcpp_(SEXP aSEXP, SEXP bSEXP, SEXP cSEXP, SEXP dSEXP) { |
| 28 | +BEGIN_RCPP |
| 29 | + Rcpp::RObject rcpp_result_gen; |
| 30 | + Rcpp::RNGScope rcpp_rngScope_gen; |
| 31 | + Rcpp::traits::input_parameter< NumericMatrix >::type a(aSEXP); |
| 32 | + Rcpp::traits::input_parameter< NumericMatrix >::type b(bSEXP); |
| 33 | + Rcpp::traits::input_parameter< NumericMatrix >::type c(cSEXP); |
| 34 | + Rcpp::traits::input_parameter< NumericMatrix >::type d(dSEXP); |
| 35 | + rcpp_result_gen = Rcpp::wrap(add_four_rcpp_(a, b, c, d)); |
| 36 | + return rcpp_result_gen; |
| 37 | +END_RCPP |
40 | 38 | } |
41 | 39 | // multiply_four_rcpp_ |
42 | | -NumericMatrix multiply_four_rcpp_(NumericMatrix a, NumericMatrix b, NumericMatrix c, |
43 | | - NumericMatrix d); |
44 | | -RcppExport SEXP _Rcppbenchmark_multiply_four_rcpp_(SEXP aSEXP, SEXP bSEXP, SEXP cSEXP, |
45 | | - SEXP dSEXP) { |
46 | | - BEGIN_RCPP |
47 | | - Rcpp::RObject rcpp_result_gen; |
48 | | - Rcpp::RNGScope rcpp_rngScope_gen; |
49 | | - Rcpp::traits::input_parameter<NumericMatrix>::type a(aSEXP); |
50 | | - Rcpp::traits::input_parameter<NumericMatrix>::type b(bSEXP); |
51 | | - Rcpp::traits::input_parameter<NumericMatrix>::type c(cSEXP); |
52 | | - Rcpp::traits::input_parameter<NumericMatrix>::type d(dSEXP); |
53 | | - rcpp_result_gen = Rcpp::wrap(multiply_four_rcpp_(a, b, c, d)); |
54 | | - return rcpp_result_gen; |
55 | | - END_RCPP |
| 40 | +NumericMatrix multiply_four_rcpp_(NumericMatrix a, NumericMatrix b, NumericMatrix c, NumericMatrix d); |
| 41 | +RcppExport SEXP _Rcppbenchmark_multiply_four_rcpp_(SEXP aSEXP, SEXP bSEXP, SEXP cSEXP, SEXP dSEXP) { |
| 42 | +BEGIN_RCPP |
| 43 | + Rcpp::RObject rcpp_result_gen; |
| 44 | + Rcpp::RNGScope rcpp_rngScope_gen; |
| 45 | + Rcpp::traits::input_parameter< NumericMatrix >::type a(aSEXP); |
| 46 | + Rcpp::traits::input_parameter< NumericMatrix >::type b(bSEXP); |
| 47 | + Rcpp::traits::input_parameter< NumericMatrix >::type c(cSEXP); |
| 48 | + Rcpp::traits::input_parameter< NumericMatrix >::type d(dSEXP); |
| 49 | + rcpp_result_gen = Rcpp::wrap(multiply_four_rcpp_(a, b, c, d)); |
| 50 | + return rcpp_result_gen; |
| 51 | +END_RCPP |
56 | 52 | } |
57 | 53 | // submatrix_manipulation_rcpp_ |
58 | 54 | NumericMatrix submatrix_manipulation_rcpp_(NumericMatrix a, NumericMatrix b); |
59 | 55 | RcppExport SEXP _Rcppbenchmark_submatrix_manipulation_rcpp_(SEXP aSEXP, SEXP bSEXP) { |
60 | | - BEGIN_RCPP |
61 | | - Rcpp::RObject rcpp_result_gen; |
62 | | - Rcpp::RNGScope rcpp_rngScope_gen; |
63 | | - Rcpp::traits::input_parameter<NumericMatrix>::type a(aSEXP); |
64 | | - Rcpp::traits::input_parameter<NumericMatrix>::type b(bSEXP); |
65 | | - rcpp_result_gen = Rcpp::wrap(submatrix_manipulation_rcpp_(a, b)); |
66 | | - return rcpp_result_gen; |
67 | | - END_RCPP |
| 56 | +BEGIN_RCPP |
| 57 | + Rcpp::RObject rcpp_result_gen; |
| 58 | + Rcpp::RNGScope rcpp_rngScope_gen; |
| 59 | + Rcpp::traits::input_parameter< NumericMatrix >::type a(aSEXP); |
| 60 | + Rcpp::traits::input_parameter< NumericMatrix >::type b(bSEXP); |
| 61 | + rcpp_result_gen = Rcpp::wrap(submatrix_manipulation_rcpp_(a, b)); |
| 62 | + return rcpp_result_gen; |
| 63 | +END_RCPP |
68 | 64 | } |
69 | 65 | // multi_operation_rcpp_ |
70 | 66 | double multi_operation_rcpp_(NumericMatrix a, NumericMatrix b, NumericMatrix c); |
71 | 67 | RcppExport SEXP _Rcppbenchmark_multi_operation_rcpp_(SEXP aSEXP, SEXP bSEXP, SEXP cSEXP) { |
72 | | - BEGIN_RCPP |
73 | | - Rcpp::RObject rcpp_result_gen; |
74 | | - Rcpp::RNGScope rcpp_rngScope_gen; |
75 | | - Rcpp::traits::input_parameter<NumericMatrix>::type a(aSEXP); |
76 | | - Rcpp::traits::input_parameter<NumericMatrix>::type b(bSEXP); |
77 | | - Rcpp::traits::input_parameter<NumericMatrix>::type c(cSEXP); |
78 | | - rcpp_result_gen = Rcpp::wrap(multi_operation_rcpp_(a, b, c)); |
79 | | - return rcpp_result_gen; |
80 | | - END_RCPP |
| 68 | +BEGIN_RCPP |
| 69 | + Rcpp::RObject rcpp_result_gen; |
| 70 | + Rcpp::RNGScope rcpp_rngScope_gen; |
| 71 | + Rcpp::traits::input_parameter< NumericMatrix >::type a(aSEXP); |
| 72 | + Rcpp::traits::input_parameter< NumericMatrix >::type b(bSEXP); |
| 73 | + Rcpp::traits::input_parameter< NumericMatrix >::type c(cSEXP); |
| 74 | + rcpp_result_gen = Rcpp::wrap(multi_operation_rcpp_(a, b, c)); |
| 75 | + return rcpp_result_gen; |
| 76 | +END_RCPP |
81 | 77 | } |
82 | 78 |
|
83 | 79 | static const R_CallMethodDef CallEntries[] = { |
84 | | - {"_Rcppbenchmark_add_two_rcpp_", (DL_FUNC)&_Rcppbenchmark_add_two_rcpp_, 2}, |
85 | | - {"_Rcppbenchmark_add_four_rcpp_", (DL_FUNC)&_Rcppbenchmark_add_four_rcpp_, 4}, |
86 | | - {"_Rcppbenchmark_multiply_four_rcpp_", (DL_FUNC)&_Rcppbenchmark_multiply_four_rcpp_, |
87 | | - 4}, |
88 | | - {"_Rcppbenchmark_submatrix_manipulation_rcpp_", |
89 | | - (DL_FUNC)&_Rcppbenchmark_submatrix_manipulation_rcpp_, 2}, |
90 | | - {"_Rcppbenchmark_multi_operation_rcpp_", |
91 | | - (DL_FUNC)&_Rcppbenchmark_multi_operation_rcpp_, 3}, |
92 | | - {NULL, NULL, 0}}; |
| 80 | + {"_Rcppbenchmark_add_two_rcpp_", (DL_FUNC) &_Rcppbenchmark_add_two_rcpp_, 2}, |
| 81 | + {"_Rcppbenchmark_add_four_rcpp_", (DL_FUNC) &_Rcppbenchmark_add_four_rcpp_, 4}, |
| 82 | + {"_Rcppbenchmark_multiply_four_rcpp_", (DL_FUNC) &_Rcppbenchmark_multiply_four_rcpp_, 4}, |
| 83 | + {"_Rcppbenchmark_submatrix_manipulation_rcpp_", (DL_FUNC) &_Rcppbenchmark_submatrix_manipulation_rcpp_, 2}, |
| 84 | + {"_Rcppbenchmark_multi_operation_rcpp_", (DL_FUNC) &_Rcppbenchmark_multi_operation_rcpp_, 3}, |
| 85 | + {NULL, NULL, 0} |
| 86 | +}; |
93 | 87 |
|
94 | | -RcppExport void R_init_Rcppbenchmark(DllInfo* dll) { |
95 | | - R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); |
96 | | - R_useDynamicSymbols(dll, FALSE); |
| 88 | +RcppExport void R_init_Rcppbenchmark(DllInfo *dll) { |
| 89 | + R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); |
| 90 | + R_useDynamicSymbols(dll, FALSE); |
97 | 91 | } |
0 commit comments