-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcpp11.cpp
More file actions
147 lines (142 loc) · 6.84 KB
/
cpp11.cpp
File metadata and controls
147 lines (142 loc) · 6.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
// Generated by cpp11: do not edit by hand
// clang-format off
#include "cpp11/declarations.hpp"
#include <R_ext/Visibility.h>
// 01_ols.cpp
doubles_matrix<> ols_mat(const doubles_matrix<>& y, const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_ols_mat(SEXP y, SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(ols_mat(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(y), cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 01_ols.cpp
doubles ols_vec(const doubles_matrix<>& y, const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_ols_vec(SEXP y, SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(ols_vec(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(y), cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
doubles_matrix<> eigen_sym_mat_no_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_sym_mat_no_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_sym_mat_no_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
doubles eigen_sym_dbl_no_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_sym_dbl_no_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_sym_dbl_no_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
list eigen_gen_mat_complex_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_gen_mat_complex_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_gen_mat_complex_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
list eigen_gen_dbl_complex_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_gen_dbl_complex_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_gen_dbl_complex_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
list eigen_gen_mat_no_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_gen_mat_no_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_gen_mat_no_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 02_eigen.cpp
list eigen_gen_dbl_no_wrapper(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_eigen_gen_dbl_no_wrapper(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(eigen_gen_dbl_no_wrapper(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 03_chol.cpp
doubles_matrix<> chol_mat(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_chol_mat(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(chol_mat(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 04_qr.cpp
doubles_matrix<> ols_qr_mat(const doubles_matrix<>& y, const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_ols_qr_mat(SEXP y, SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(ols_qr_mat(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(y), cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 04_qr.cpp
doubles ols_qr_dbl(const doubles_matrix<>& y, const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_ols_qr_dbl(SEXP y, SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(ols_qr_dbl(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(y), cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 05_capm.cpp
doubles_matrix<> capm(const doubles_matrix<>& r, const doubles_matrix<>& m, double f);
extern "C" SEXP _cpp11eigentest_capm(SEXP r, SEXP m, SEXP f) {
BEGIN_CPP11
return cpp11::as_sexp(capm(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(r), cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(m), cpp11::as_cpp<cpp11::decay_t<double>>(f)));
END_CPP11
}
// 06_typedefs.cpp
doubles typedef_Col_double(const doubles& x);
extern "C" SEXP _cpp11eigentest_typedef_Col_double(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(typedef_Col_double(cpp11::as_cpp<cpp11::decay_t<const doubles&>>(x)));
END_CPP11
}
// 06_typedefs.cpp
integers typedef_Col_int(const integers& x);
extern "C" SEXP _cpp11eigentest_typedef_Col_int(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(typedef_Col_int(cpp11::as_cpp<cpp11::decay_t<const integers&>>(x)));
END_CPP11
}
// 06_typedefs.cpp
doubles_matrix<> typedef_Mat_double(const doubles_matrix<>& x);
extern "C" SEXP _cpp11eigentest_typedef_Mat_double(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(typedef_Mat_double(cpp11::as_cpp<cpp11::decay_t<const doubles_matrix<>&>>(x)));
END_CPP11
}
// 06_typedefs.cpp
integers_matrix<> typedef_Mat_int(const integers_matrix<>& x);
extern "C" SEXP _cpp11eigentest_typedef_Mat_int(SEXP x) {
BEGIN_CPP11
return cpp11::as_sexp(typedef_Mat_int(cpp11::as_cpp<cpp11::decay_t<const integers_matrix<>&>>(x)));
END_CPP11
}
extern "C" {
static const R_CallMethodDef CallEntries[] = {
{"_cpp11eigentest_capm", (DL_FUNC) &_cpp11eigentest_capm, 3},
{"_cpp11eigentest_chol_mat", (DL_FUNC) &_cpp11eigentest_chol_mat, 1},
{"_cpp11eigentest_eigen_gen_dbl_complex_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_gen_dbl_complex_wrapper, 1},
{"_cpp11eigentest_eigen_gen_dbl_no_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_gen_dbl_no_wrapper, 1},
{"_cpp11eigentest_eigen_gen_mat_complex_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_gen_mat_complex_wrapper, 1},
{"_cpp11eigentest_eigen_gen_mat_no_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_gen_mat_no_wrapper, 1},
{"_cpp11eigentest_eigen_sym_dbl_no_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_sym_dbl_no_wrapper, 1},
{"_cpp11eigentest_eigen_sym_mat_no_wrapper", (DL_FUNC) &_cpp11eigentest_eigen_sym_mat_no_wrapper, 1},
{"_cpp11eigentest_ols_mat", (DL_FUNC) &_cpp11eigentest_ols_mat, 2},
{"_cpp11eigentest_ols_qr_dbl", (DL_FUNC) &_cpp11eigentest_ols_qr_dbl, 2},
{"_cpp11eigentest_ols_qr_mat", (DL_FUNC) &_cpp11eigentest_ols_qr_mat, 2},
{"_cpp11eigentest_ols_vec", (DL_FUNC) &_cpp11eigentest_ols_vec, 2},
{"_cpp11eigentest_typedef_Col_double", (DL_FUNC) &_cpp11eigentest_typedef_Col_double, 1},
{"_cpp11eigentest_typedef_Col_int", (DL_FUNC) &_cpp11eigentest_typedef_Col_int, 1},
{"_cpp11eigentest_typedef_Mat_double", (DL_FUNC) &_cpp11eigentest_typedef_Mat_double, 1},
{"_cpp11eigentest_typedef_Mat_int", (DL_FUNC) &_cpp11eigentest_typedef_Mat_int, 1},
{NULL, NULL, 0}
};
}
extern "C" attribute_visible void R_init_cpp11eigentest(DllInfo* dll){
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
R_forceSymbols(dll, TRUE);
}