MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / wrap_dispatch_importer__impl__prim

Function wrap_dispatch_importer__impl__prim

inst/include/Rcpp/internal/wrap.h:666–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664
665 template <typename T, typename elem_type>
666 inline SEXP wrap_dispatch_importer__impl__prim(const T& object, ::Rcpp::traits::false_type) {
667 int size = object.size();
668 const int RTYPE = ::Rcpp::traits::r_sexptype_traits<elem_type>::rtype;
669 Shield<SEXP> x(Rf_allocVector(RTYPE, size));
670 typedef typename ::Rcpp::traits::storage_type<RTYPE>::type CTYPE;
671 CTYPE* start = r_vector_start<RTYPE>(x);
672 for (int i=0; i<size; i++) {
673 start[i] = object.get(i);
674 }
675 return x;
676
677 }
678
679 template <typename T, typename elem_type>
680 inline SEXP wrap_dispatch_importer__impl__prim(const T& object, ::Rcpp::traits::true_type) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected