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

Method IndexHash

inst/include/Rcpp/hash/IndexHash.h:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 typedef Vector<RTYPE> VECTOR ;
54
55 IndexHash( SEXP table ) : n(Rf_length(table)), m(2), k(1), src( (STORAGE*)dataptr(table) ), size_(0)
56 , data()
57 #ifdef HASH_PROFILE
58 , profile_data()
59 #endif
60 {
61 RCPP_PROFILE_TIC
62 int desired = n*2 ;
63 while( m < desired ){ m *= 2 ; k++ ; }
64 #ifdef RCPP_USE_CACHE_HASH
65 data = get_cache(m) ;
66 #else
67 data.resize( m ) ;
68 #endif
69 RCPP_PROFILE_TOC
70 RCPP_PROFILE_RECORD(ctor_body)
71
72 }
73
74 inline IndexHash& fill(){
75 RCPP_PROFILE_TIC

Callers

nothing calls this directly

Calls 2

dataptrFunction · 0.50
get_cacheFunction · 0.50

Tested by

no test coverage detected