24#ifndef RCPP__HASH__INDEX_HASH_H
25#define RCPP__HASH__INDEX_HASH_H
27#if ( defined(HASH_PROFILE) && defined(__APPLE__) )
29 #include <mach/mach_time.h>
30 #define ABSOLUTE_TIME mach_absolute_time
31 #define RCPP_PROFILE_TIC start = ABSOLUTE_TIME() ;
32 #define RCPP_PROFILE_TOC end = ABSOLUTE_TIME() ;
33 #define RCPP_PROFILE_RECORD(name) profile_data[#name] = end - start ;
35 #define RCPP_PROFILE_TIC
36 #define RCPP_PROFILE_TOC
37 #define RCPP_PROFILE_RECORD(name)
39#define RCPP_USE_CACHE_HASH
45 #define RCPP_HASH(X) (3141592653U * ((uint32_t)(X)) >> (32 - k))
63 #ifdef RCPP_USE_CACHE_HASH
87 for(
int i=0; i<
n; i++) res[i] = !
add_value(i) ;
112 for(
int i=0, j=0; j<
size_; i++){
121 #ifdef RCPP_USE_CACHE_HASH
124 std::vector<int>
data ;
133 template <
typename T>
146 for(
int i=0; i<
n_; i++) v[i] =
get_index( vec[i] ) ;
215 if (
val == 0.0)
val = 0.0;
227 #if (defined _LP64) || (defined __LP64__) || (defined WIN64)
#define RCPP_PROFILE_RECORD(name)
SEXP lookup(const VECTOR &vec) const
bool contains(STORAGE val) const
bool not_equal(const STORAGE &lhs, const STORAGE &rhs)
uint32_t get_addr(STORAGE value) const
SEXP lookup__impl(const T &vec, int n_) const
Vector< RTYPE > keys() const
traits::storage_type< RTYPE >::type STORAGE
SEXP lookup(const T &vec) const
LogicalVector fill_and_get_duplicated()
uint32_t get_index(STORAGE value) const
#define RCPP_DEBUG_2(fmt, M1, M2)
#define DEMANGLE(__TYPE__)
T as(SEXP x, ::Rcpp::traits::r_type_primitive_tag)
no_init_vector no_init(R_xlen_t size)
IntegerVector table(const VectorBase< RTYPE, NA, T > &x)
SEXP wrap(const Date &date)
attribute_hidden int * get_cache(int n)