Skip to content

Commit d822b21

Browse files
committed
register native routines
1 parent f597d4b commit d822b21

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/init.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
#include <R.h>
3+
#include <Rinternals.h>
4+
#include <stdlib.h> // for NULL
5+
#include <R_ext/Rdynload.h>
6+
7+
/* .Call calls */
8+
extern "C" SEXP defaultNumThreads();
9+
extern "C" SEXP setThreadOptions(SEXP, SEXP);
10+
11+
static const R_CallMethodDef CallEntries[] = {
12+
{"defaultNumThreads", (DL_FUNC) &defaultNumThreads, 0},
13+
{"setThreadOptions", (DL_FUNC) &setThreadOptions, 2},
14+
{NULL, NULL, 0}
15+
};
16+
17+
extern "C" void R_init_RcppParallel(DllInfo *dll)
18+
{
19+
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
20+
R_useDynamicSymbols(dll, FALSE);
21+
}

0 commit comments

Comments
 (0)