Skip to content

Commit

Permalink
Add memory header so smart pointers work with gcc compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dincerti committed May 19, 2018
1 parent 81028e3 commit a192524
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 142 deletions.
15 changes: 0 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,5 @@ sudo: false
cache: packages
warnings_are_errors: false

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9

before_install: |
mkdir ~/.R
cat <<EOF > ~/.R/Makevars
CXX1X=g++-4.9
CXX1XSTD=-std=c++11
after_success:
- Rscript -e 'covr::codecov()'
56 changes: 28 additions & 28 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

C_test_xptr_TimeFunTest <- function(L) {
.Call('_hesim_C_test_xptr_TimeFunTest', PACKAGE = 'hesim', L)
}

C_test_InputDataMP <- function(R_InputData, param_index, strategy_index, line_index, state_index, patient_index) {
.Call('_hesim_C_test_InputDataMP', PACKAGE = 'hesim', R_InputData, param_index, strategy_index, line_index, state_index, patient_index)
}

C_test_TimeFunMP <- function(R_InputData, time_old, time_new, state) {
.Call('_hesim_C_test_TimeFunMP', PACKAGE = 'hesim', R_InputData, time_old, time_new, state)
}

C_PartSurvCurves_summary <- function(R_PartSurvCurves, x, type, dr) {
.Call('_hesim_C_PartSurvCurves_summary', PACKAGE = 'hesim', R_PartSurvCurves, x, type, dr)
}

C_PartSurvStateVals_predict <- function(R_PartSurvStateVals) {
.Call('_hesim_C_PartSurvStateVals_predict', PACKAGE = 'hesim', R_PartSurvStateVals)
}

C_PartSurv_sim_stateprobs <- function(R_PartSurv) {
.Call('_hesim_C_PartSurv_sim_stateprobs', PACKAGE = 'hesim', R_PartSurv)
}

C_PartSurv_sim_auc <- function(R_PartSurv, R_stateprobs, dr, type, type_names) {
.Call('_hesim_C_PartSurv_sim_auc', PACKAGE = 'hesim', R_PartSurv, R_stateprobs, dr, type, type_names)
}

vecmax_index <- function(x) {
.Call('_hesim_vecmax_index', PACKAGE = 'hesim', x)
}
Expand Down Expand Up @@ -121,6 +93,18 @@ C_rdirichlet_mat <- function(n, alpha) {
.Call('_hesim_rdirichlet_mat', PACKAGE = 'hesim', n, alpha)
}

C_test_xptr_TimeFunTest <- function(L) {
.Call('_hesim_C_test_xptr_TimeFunTest', PACKAGE = 'hesim', L)
}

C_test_InputDataMP <- function(R_InputData, param_index, strategy_index, line_index, state_index, patient_index) {
.Call('_hesim_C_test_InputDataMP', PACKAGE = 'hesim', R_InputData, param_index, strategy_index, line_index, state_index, patient_index)
}

C_test_TimeFunMP <- function(R_InputData, time_old, time_new, state) {
.Call('_hesim_C_test_TimeFunMP', PACKAGE = 'hesim', R_InputData, time_old, time_new, state)
}

C_test_trapzfun <- function(x) {
.Call('_hesim_C_test_trapzfun', PACKAGE = 'hesim', x)
}
Expand All @@ -141,6 +125,22 @@ C_test_cumsimpsfun <- function(t) {
.Call('_hesim_C_test_cumsimpsfun', PACKAGE = 'hesim', t)
}

C_PartSurvCurves_summary <- function(R_PartSurvCurves, x, type, dr) {
.Call('_hesim_C_PartSurvCurves_summary', PACKAGE = 'hesim', R_PartSurvCurves, x, type, dr)
}

C_PartSurvStateVals_predict <- function(R_PartSurvStateVals) {
.Call('_hesim_C_PartSurvStateVals_predict', PACKAGE = 'hesim', R_PartSurvStateVals)
}

C_PartSurv_sim_stateprobs <- function(R_PartSurv) {
.Call('_hesim_C_PartSurv_sim_stateprobs', PACKAGE = 'hesim', R_PartSurv)
}

C_PartSurv_sim_auc <- function(R_PartSurv, R_stateprobs, dr, type, type_names) {
.Call('_hesim_C_PartSurv_sim_auc', PACKAGE = 'hesim', R_PartSurv, R_stateprobs, dr, type, type_names)
}

matrix_byrow <- function(v, nrow, ncol) {
.Call('_hesim_matrix_byrow', PACKAGE = 'hesim', v, nrow, ncol)
}
Expand Down
1 change: 1 addition & 0 deletions inst/include/hesim/distributions.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "utils.h"
#include <RcppNumerical.h>
#include "zeroin.h"
#include <memory>

namespace hesim{

Expand Down
198 changes: 99 additions & 99 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,98 +10,6 @@

using namespace Rcpp;

// C_test_xptr_TimeFunTest
SEXP C_test_xptr_TimeFunTest(Rcpp::List L);
RcppExport SEXP _hesim_C_test_xptr_TimeFunTest(SEXP LSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::List >::type L(LSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_xptr_TimeFunTest(L));
return rcpp_result_gen;
END_RCPP
}
// C_test_InputDataMP
arma::rowvec C_test_InputDataMP(Rcpp::Environment R_InputData, int param_index, int strategy_index, int line_index, int state_index, int patient_index);
RcppExport SEXP _hesim_C_test_InputDataMP(SEXP R_InputDataSEXP, SEXP param_indexSEXP, SEXP strategy_indexSEXP, SEXP line_indexSEXP, SEXP state_indexSEXP, SEXP patient_indexSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_InputData(R_InputDataSEXP);
Rcpp::traits::input_parameter< int >::type param_index(param_indexSEXP);
Rcpp::traits::input_parameter< int >::type strategy_index(strategy_indexSEXP);
Rcpp::traits::input_parameter< int >::type line_index(line_indexSEXP);
Rcpp::traits::input_parameter< int >::type state_index(state_indexSEXP);
Rcpp::traits::input_parameter< int >::type patient_index(patient_indexSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_InputDataMP(R_InputData, param_index, strategy_index, line_index, state_index, patient_index));
return rcpp_result_gen;
END_RCPP
}
// C_test_TimeFunMP
arma::rowvec C_test_TimeFunMP(Rcpp::Environment R_InputData, int time_old, int time_new, int state);
RcppExport SEXP _hesim_C_test_TimeFunMP(SEXP R_InputDataSEXP, SEXP time_oldSEXP, SEXP time_newSEXP, SEXP stateSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_InputData(R_InputDataSEXP);
Rcpp::traits::input_parameter< int >::type time_old(time_oldSEXP);
Rcpp::traits::input_parameter< int >::type time_new(time_newSEXP);
Rcpp::traits::input_parameter< int >::type state(stateSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_TimeFunMP(R_InputData, time_old, time_new, state));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurvCurves_summary
Rcpp::DataFrame C_PartSurvCurves_summary(Rcpp::Environment R_PartSurvCurves, std::vector<double> x, std::string type, double dr);
RcppExport SEXP _hesim_C_PartSurvCurves_summary(SEXP R_PartSurvCurvesSEXP, SEXP xSEXP, SEXP typeSEXP, SEXP drSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurvCurves(R_PartSurvCurvesSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
Rcpp::traits::input_parameter< double >::type dr(drSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurvCurves_summary(R_PartSurvCurves, x, type, dr));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurvStateVals_predict
Rcpp::DataFrame C_PartSurvStateVals_predict(Rcpp::Environment R_PartSurvStateVals);
RcppExport SEXP _hesim_C_PartSurvStateVals_predict(SEXP R_PartSurvStateValsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurvStateVals(R_PartSurvStateValsSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurvStateVals_predict(R_PartSurvStateVals));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurv_sim_stateprobs
Rcpp::List C_PartSurv_sim_stateprobs(Rcpp::Environment R_PartSurv);
RcppExport SEXP _hesim_C_PartSurv_sim_stateprobs(SEXP R_PartSurvSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurv(R_PartSurvSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurv_sim_stateprobs(R_PartSurv));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurv_sim_auc
Rcpp::List C_PartSurv_sim_auc(Rcpp::Environment R_PartSurv, Rcpp::DataFrame R_stateprobs, std::vector<double> dr, std::string type, std::vector<std::string> type_names);
RcppExport SEXP _hesim_C_PartSurv_sim_auc(SEXP R_PartSurvSEXP, SEXP R_stateprobsSEXP, SEXP drSEXP, SEXP typeSEXP, SEXP type_namesSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurv(R_PartSurvSEXP);
Rcpp::traits::input_parameter< Rcpp::DataFrame >::type R_stateprobs(R_stateprobsSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type dr(drSEXP);
Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
Rcpp::traits::input_parameter< std::vector<std::string> >::type type_names(type_namesSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurv_sim_auc(R_PartSurv, R_stateprobs, dr, type, type_names));
return rcpp_result_gen;
END_RCPP
}
// vecmax_index
int vecmax_index(std::vector<double> x);
RcppExport SEXP _hesim_vecmax_index(SEXP xSEXP) {
Expand Down Expand Up @@ -662,6 +570,47 @@ RcppExport SEXP _hesim_rdirichlet_mat(SEXP nSEXP, SEXP alphaSEXP) {
UNPROTECT(1);
return rcpp_result_gen;
}
// C_test_xptr_TimeFunTest
SEXP C_test_xptr_TimeFunTest(Rcpp::List L);
RcppExport SEXP _hesim_C_test_xptr_TimeFunTest(SEXP LSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::List >::type L(LSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_xptr_TimeFunTest(L));
return rcpp_result_gen;
END_RCPP
}
// C_test_InputDataMP
arma::rowvec C_test_InputDataMP(Rcpp::Environment R_InputData, int param_index, int strategy_index, int line_index, int state_index, int patient_index);
RcppExport SEXP _hesim_C_test_InputDataMP(SEXP R_InputDataSEXP, SEXP param_indexSEXP, SEXP strategy_indexSEXP, SEXP line_indexSEXP, SEXP state_indexSEXP, SEXP patient_indexSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_InputData(R_InputDataSEXP);
Rcpp::traits::input_parameter< int >::type param_index(param_indexSEXP);
Rcpp::traits::input_parameter< int >::type strategy_index(strategy_indexSEXP);
Rcpp::traits::input_parameter< int >::type line_index(line_indexSEXP);
Rcpp::traits::input_parameter< int >::type state_index(state_indexSEXP);
Rcpp::traits::input_parameter< int >::type patient_index(patient_indexSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_InputDataMP(R_InputData, param_index, strategy_index, line_index, state_index, patient_index));
return rcpp_result_gen;
END_RCPP
}
// C_test_TimeFunMP
arma::rowvec C_test_TimeFunMP(Rcpp::Environment R_InputData, int time_old, int time_new, int state);
RcppExport SEXP _hesim_C_test_TimeFunMP(SEXP R_InputDataSEXP, SEXP time_oldSEXP, SEXP time_newSEXP, SEXP stateSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_InputData(R_InputDataSEXP);
Rcpp::traits::input_parameter< int >::type time_old(time_oldSEXP);
Rcpp::traits::input_parameter< int >::type time_new(time_newSEXP);
Rcpp::traits::input_parameter< int >::type state(stateSEXP);
rcpp_result_gen = Rcpp::wrap(C_test_TimeFunMP(R_InputData, time_old, time_new, state));
return rcpp_result_gen;
END_RCPP
}
// C_test_trapzfun
double C_test_trapzfun(std::vector<double> x);
RcppExport SEXP _hesim_C_test_trapzfun(SEXP xSEXP) {
Expand Down Expand Up @@ -718,6 +667,57 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
// C_PartSurvCurves_summary
Rcpp::DataFrame C_PartSurvCurves_summary(Rcpp::Environment R_PartSurvCurves, std::vector<double> x, std::string type, double dr);
RcppExport SEXP _hesim_C_PartSurvCurves_summary(SEXP R_PartSurvCurvesSEXP, SEXP xSEXP, SEXP typeSEXP, SEXP drSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurvCurves(R_PartSurvCurvesSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
Rcpp::traits::input_parameter< double >::type dr(drSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurvCurves_summary(R_PartSurvCurves, x, type, dr));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurvStateVals_predict
Rcpp::DataFrame C_PartSurvStateVals_predict(Rcpp::Environment R_PartSurvStateVals);
RcppExport SEXP _hesim_C_PartSurvStateVals_predict(SEXP R_PartSurvStateValsSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurvStateVals(R_PartSurvStateValsSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurvStateVals_predict(R_PartSurvStateVals));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurv_sim_stateprobs
Rcpp::List C_PartSurv_sim_stateprobs(Rcpp::Environment R_PartSurv);
RcppExport SEXP _hesim_C_PartSurv_sim_stateprobs(SEXP R_PartSurvSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurv(R_PartSurvSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurv_sim_stateprobs(R_PartSurv));
return rcpp_result_gen;
END_RCPP
}
// C_PartSurv_sim_auc
Rcpp::List C_PartSurv_sim_auc(Rcpp::Environment R_PartSurv, Rcpp::DataFrame R_stateprobs, std::vector<double> dr, std::string type, std::vector<std::string> type_names);
RcppExport SEXP _hesim_C_PartSurv_sim_auc(SEXP R_PartSurvSEXP, SEXP R_stateprobsSEXP, SEXP drSEXP, SEXP typeSEXP, SEXP type_namesSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< Rcpp::Environment >::type R_PartSurv(R_PartSurvSEXP);
Rcpp::traits::input_parameter< Rcpp::DataFrame >::type R_stateprobs(R_stateprobsSEXP);
Rcpp::traits::input_parameter< std::vector<double> >::type dr(drSEXP);
Rcpp::traits::input_parameter< std::string >::type type(typeSEXP);
Rcpp::traits::input_parameter< std::vector<std::string> >::type type_names(type_namesSEXP);
rcpp_result_gen = Rcpp::wrap(C_PartSurv_sim_auc(R_PartSurv, R_stateprobs, dr, type, type_names));
return rcpp_result_gen;
END_RCPP
}
// matrix_byrow
arma::mat matrix_byrow(arma::rowvec v, int nrow, int ncol);
RcppExport SEXP _hesim_matrix_byrow(SEXP vSEXP, SEXP nrowSEXP, SEXP ncolSEXP) {
Expand Down Expand Up @@ -812,13 +812,6 @@ RcppExport SEXP _hesim_RcppExport_registerCCallable() {
RcppExport SEXP _rcpp_module_boot_Distributions();

static const R_CallMethodDef CallEntries[] = {
{"_hesim_C_test_xptr_TimeFunTest", (DL_FUNC) &_hesim_C_test_xptr_TimeFunTest, 1},
{"_hesim_C_test_InputDataMP", (DL_FUNC) &_hesim_C_test_InputDataMP, 6},
{"_hesim_C_test_TimeFunMP", (DL_FUNC) &_hesim_C_test_TimeFunMP, 4},
{"_hesim_C_PartSurvCurves_summary", (DL_FUNC) &_hesim_C_PartSurvCurves_summary, 4},
{"_hesim_C_PartSurvStateVals_predict", (DL_FUNC) &_hesim_C_PartSurvStateVals_predict, 1},
{"_hesim_C_PartSurv_sim_stateprobs", (DL_FUNC) &_hesim_C_PartSurv_sim_stateprobs, 1},
{"_hesim_C_PartSurv_sim_auc", (DL_FUNC) &_hesim_C_PartSurv_sim_auc, 5},
{"_hesim_vecmax_index", (DL_FUNC) &_hesim_vecmax_index, 1},
{"_hesim_vecmax", (DL_FUNC) &_hesim_vecmax, 1},
{"_hesim_rowmaxC", (DL_FUNC) &_hesim_rowmaxC, 1},
Expand All @@ -842,11 +835,18 @@ static const R_CallMethodDef CallEntries[] = {
{"_hesim_rcat_vec", (DL_FUNC) &_hesim_rcat_vec, 2},
{"_hesim_rdirichlet", (DL_FUNC) &_hesim_rdirichlet, 1},
{"_hesim_rdirichlet_mat", (DL_FUNC) &_hesim_rdirichlet_mat, 2},
{"_hesim_C_test_xptr_TimeFunTest", (DL_FUNC) &_hesim_C_test_xptr_TimeFunTest, 1},
{"_hesim_C_test_InputDataMP", (DL_FUNC) &_hesim_C_test_InputDataMP, 6},
{"_hesim_C_test_TimeFunMP", (DL_FUNC) &_hesim_C_test_TimeFunMP, 4},
{"_hesim_C_test_trapzfun", (DL_FUNC) &_hesim_C_test_trapzfun, 1},
{"_hesim_C_test_trapz", (DL_FUNC) &_hesim_C_test_trapz, 2},
{"_hesim_C_test_cumtrapzfun", (DL_FUNC) &_hesim_C_test_cumtrapzfun, 1},
{"_hesim_C_test_simpsfun", (DL_FUNC) &_hesim_C_test_simpsfun, 1},
{"_hesim_C_test_cumsimpsfun", (DL_FUNC) &_hesim_C_test_cumsimpsfun, 1},
{"_hesim_C_PartSurvCurves_summary", (DL_FUNC) &_hesim_C_PartSurvCurves_summary, 4},
{"_hesim_C_PartSurvStateVals_predict", (DL_FUNC) &_hesim_C_PartSurvStateVals_predict, 1},
{"_hesim_C_PartSurv_sim_stateprobs", (DL_FUNC) &_hesim_C_PartSurv_sim_stateprobs, 1},
{"_hesim_C_PartSurv_sim_auc", (DL_FUNC) &_hesim_C_PartSurv_sim_auc, 5},
{"_hesim_matrix_byrow", (DL_FUNC) &_hesim_matrix_byrow, 3},
{"_hesim_matrix_bycol", (DL_FUNC) &_hesim_matrix_bycol, 3},
{"_hesim_test_C_add_constant", (DL_FUNC) &_hesim_test_C_add_constant, 2},
Expand Down

0 comments on commit a192524

Please sign in to comment.