OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{HashTable.cpp} Namespace Reference

Namespaces

 keyed_hash
 
 perfect_hash
 

Functions

template<typename T >
void inner_to_string (const int8_t *ptr1, size_t entry_count, size_t key_component_count, bool raw, std::string &txt)
 

Function Documentation

template<typename T >
void anonymous_namespace{HashTable.cpp}::inner_to_string ( const int8_t *  ptr1,
size_t  entry_count,
size_t  key_component_count,
bool  raw,
std::string &  txt 
)

Definition at line 195 of file HashTable.cpp.

References heavydb.dtypes::T, and to_string().

199  {
200  auto empty = get_empty_key<T>();
201  auto ptr = reinterpret_cast<const T*>(ptr1);
202  for (size_t e = 0; e < entry_count; ++e, ptr += key_component_count) {
203  if (e != 0) {
204  txt += " ";
205  }
206  if (*ptr == empty && !raw) {
207  txt += "*"; // null hash table entry
208  } else if (*ptr == empty - 1 && !raw) {
209  txt += "?"; // write_pending (should never happen here)
210  } else {
211  txt += "(";
212  for (size_t j = 0; j < key_component_count; ++j) {
213  if (j != 0) {
214  txt += ",";
215  }
216  txt += std::to_string(ptr[j]);
217  }
218  txt += ")";
219  }
220  }
221 }
std::string to_string(char const *&&v)

+ Here is the call graph for this function: