Skip to content

Commit

Permalink
Rename internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Mar 18, 2017
1 parent 91b1769 commit 87dc667
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion R/SimInf.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ NULL
##' @keywords internal
have_openmp <- function()
{
.Call("siminf_have_openmp", PACKAGE = "SimInf")
.Call(SimInf_have_openmp)
}

##' Scheduled events example data
Expand Down
14 changes: 0 additions & 14 deletions src/SimInf.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,3 @@ SEXP SimInf_run(

return trajectory;
}

/**
* Is OpenMP available
*/
SEXP siminf_have_openmp()
{
return Rf_ScalarLogical(
#ifdef _OPENMP
1
#else
0
#endif
);
}
17 changes: 15 additions & 2 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,20 @@ SEXP SISe3_run(SEXP, SEXP, SEXP);
SEXP SISe3_sp_run(SEXP, SEXP, SEXP);
SEXP SISe_sp_run(SEXP, SEXP, SEXP);
SEXP siminf_ldata_sp(SEXP, SEXP, SEXP);
SEXP siminf_have_openmp();

/**
* Is OpenMP available
*/
SEXP SimInf_have_openmp()
{
return Rf_ScalarLogical(
#ifdef _OPENMP
1
#else
0
#endif
);
}

#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n}

Expand All @@ -43,7 +56,7 @@ static const R_CallMethodDef callMethods[] =
CALLDEF(SISe3_run, 3),
CALLDEF(SISe3_sp_run, 3),
CALLDEF(SISe_sp_run, 3),
CALLDEF(siminf_have_openmp, 0),
CALLDEF(SimInf_have_openmp, 0),
CALLDEF(siminf_ldata_sp, 3),
{NULL, NULL, 0}
};
Expand Down

0 comments on commit 87dc667

Please sign in to comment.