// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// efron_pass_cpp
List efron_pass_cpp(NumericVector t, IntegerVector e, NumericMatrix X, NumericVector beta);
RcppExport SEXP _coxstream_efron_pass_cpp(SEXP tSEXP, SEXP eSEXP, SEXP XSEXP, SEXP betaSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type t(tSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type e(eSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type X(XSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type beta(betaSEXP);
    rcpp_result_gen = Rcpp::wrap(efron_pass_cpp(t, e, X, beta));
    return rcpp_result_gen;
END_RCPP
}
// cox_alloc_arrow_array_stream
SEXP cox_alloc_arrow_array_stream();
RcppExport SEXP _coxstream_cox_alloc_arrow_array_stream() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    rcpp_result_gen = Rcpp::wrap(cox_alloc_arrow_array_stream());
    return rcpp_result_gen;
END_RCPP
}
// efron_stream_chunk_inplace
double efron_stream_chunk_inplace(SEXP stream_xptr, int p, NumericVector beta, NumericVector S0_v, NumericVector S1, NumericMatrix S2, NumericVector score, NumericMatrix neg_H, NumericVector t_open_v, IntegerVector n_pend_v, NumericVector tS0_pend_v, NumericVector tS1_pend, NumericMatrix tS2_pend, NumericVector ll_raw_v, NumericVector sc_raw);
RcppExport SEXP _coxstream_efron_stream_chunk_inplace(SEXP stream_xptrSEXP, SEXP pSEXP, SEXP betaSEXP, SEXP S0_vSEXP, SEXP S1SEXP, SEXP S2SEXP, SEXP scoreSEXP, SEXP neg_HSEXP, SEXP t_open_vSEXP, SEXP n_pend_vSEXP, SEXP tS0_pend_vSEXP, SEXP tS1_pendSEXP, SEXP tS2_pendSEXP, SEXP ll_raw_vSEXP, SEXP sc_rawSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type stream_xptr(stream_xptrSEXP);
    Rcpp::traits::input_parameter< int >::type p(pSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type beta(betaSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type S0_v(S0_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type S1(S1SEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type S2(S2SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score(scoreSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type neg_H(neg_HSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type t_open_v(t_open_vSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type n_pend_v(n_pend_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type tS0_pend_v(tS0_pend_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type tS1_pend(tS1_pendSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type tS2_pend(tS2_pendSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ll_raw_v(ll_raw_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sc_raw(sc_rawSEXP);
    rcpp_result_gen = Rcpp::wrap(efron_stream_chunk_inplace(stream_xptr, p, beta, S0_v, S1, S2, score, neg_H, t_open_v, n_pend_v, tS0_pend_v, tS1_pend, tS2_pend, ll_raw_v, sc_raw));
    return rcpp_result_gen;
END_RCPP
}
// efron_flush_exact_inplace
double efron_flush_exact_inplace(NumericVector S0_v, NumericVector S1, NumericMatrix S2, NumericVector score, NumericMatrix neg_H, IntegerVector n_pend_v, NumericVector tS0_pend_v, NumericVector tS1_pend, NumericMatrix tS2_pend, NumericVector ll_raw_v, NumericVector sc_raw);
RcppExport SEXP _coxstream_efron_flush_exact_inplace(SEXP S0_vSEXP, SEXP S1SEXP, SEXP S2SEXP, SEXP scoreSEXP, SEXP neg_HSEXP, SEXP n_pend_vSEXP, SEXP tS0_pend_vSEXP, SEXP tS1_pendSEXP, SEXP tS2_pendSEXP, SEXP ll_raw_vSEXP, SEXP sc_rawSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type S0_v(S0_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type S1(S1SEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type S2(S2SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type score(scoreSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type neg_H(neg_HSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type n_pend_v(n_pend_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type tS0_pend_v(tS0_pend_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type tS1_pend(tS1_pendSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type tS2_pend(tS2_pendSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type ll_raw_v(ll_raw_vSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type sc_raw(sc_rawSEXP);
    rcpp_result_gen = Rcpp::wrap(efron_flush_exact_inplace(S0_v, S1, S2, score, neg_H, n_pend_v, tS0_pend_v, tS1_pend, tS2_pend, ll_raw_v, sc_raw));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_coxstream_efron_pass_cpp", (DL_FUNC) &_coxstream_efron_pass_cpp, 4},
    {"_coxstream_cox_alloc_arrow_array_stream", (DL_FUNC) &_coxstream_cox_alloc_arrow_array_stream, 0},
    {"_coxstream_efron_stream_chunk_inplace", (DL_FUNC) &_coxstream_efron_stream_chunk_inplace, 15},
    {"_coxstream_efron_flush_exact_inplace", (DL_FUNC) &_coxstream_efron_flush_exact_inplace, 11},
    {NULL, NULL, 0}
};

RcppExport void R_init_coxstream(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
