Flex  0.17.9
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
gs::LFIndexer< INDEX_T > Class Template Reference

#include <id_indexer.h>

Collaboration diagram for gs::LFIndexer< INDEX_T >:
Collaboration graph
[legend]

Public Member Functions

 LFIndexer ()
 
 LFIndexer (LFIndexer &&rhs)
 
 ~LFIndexer ()
 
void init (const PropertyType &type)
 
void build_empty_LFIndexer (const std::string &filename, const std::string &snapshot_dir, const std::string &work_dir)
 
void reserve (size_t size)
 
void rehash (size_t size)
 
size_t capacity () const
 
size_t size () const
 
PropertyType get_type () const
 
INDEX_T insert (const Any &oid)
 
INDEX_T get_index (const Any &oid) const
 
bool get_index (const Any &oid, INDEX_T &ret) const
 
Any get_key (const INDEX_T &index) const
 
void copy_to_tmp (const std::string &cur_path, const std::string &tmp_path)
 
void open (const std::string &name, const std::string &snapshot_dir, const std::string &work_dir)
 
void open_in_memory (const std::string &name)
 
void open_with_hugepages (const std::string &name, bool hugepage_table)
 
void dump (const std::string &name, const std::string &snapshot_dir)
 
void close ()
 
void dump_meta (const std::string &filename) const
 
void load_meta (const std::string &filename)
 
const ColumnBaseget_keys () const
 
void warmup (int thread_num) const
 

Static Public Member Functions

static std::string prefix ()
 

Private Attributes

mmap_array< INDEX_T > indices_
 
size_t indices_size_
 
std::atomic< size_t > num_elements_
 
size_t num_slots_minus_one_
 
ColumnBasekeys_
 
ska::ska::prime_number_hash_policy hash_policy_
 
GHash< Anyhasher_
 

Friends

template<typename _KEY_T , typename _INDEX_T >
void build_lf_indexer (const IdIndexer< _KEY_T, _INDEX_T > &input, const std::string &filename, LFIndexer< _INDEX_T > &output, const std::string &snapshot_dir, const std::string &work_dir, PropertyType type)
 

Constructor & Destructor Documentation

◆ LFIndexer() [1/2]

template<typename INDEX_T >
gs::LFIndexer< INDEX_T >::LFIndexer ( )
inline

◆ LFIndexer() [2/2]

template<typename INDEX_T >
gs::LFIndexer< INDEX_T >::LFIndexer ( LFIndexer< INDEX_T > &&  rhs)
inline

◆ ~LFIndexer()

template<typename INDEX_T >
gs::LFIndexer< INDEX_T >::~LFIndexer ( )
inline

Member Function Documentation

◆ build_empty_LFIndexer()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::build_empty_LFIndexer ( const std::string &  filename,
const std::string &  snapshot_dir,
const std::string &  work_dir 
)
inline

◆ capacity()

template<typename INDEX_T >
size_t gs::LFIndexer< INDEX_T >::capacity ( ) const
inline

◆ close()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::close ( )
inline

◆ copy_to_tmp()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::copy_to_tmp ( const std::string &  cur_path,
const std::string &  tmp_path 
)
inline

◆ dump()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::dump ( const std::string &  name,
const std::string &  snapshot_dir 
)
inline

◆ dump_meta()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::dump_meta ( const std::string &  filename) const
inline

◆ get_index() [1/2]

template<typename INDEX_T >
INDEX_T gs::LFIndexer< INDEX_T >::get_index ( const Any oid) const
inline

◆ get_index() [2/2]

template<typename INDEX_T >
bool gs::LFIndexer< INDEX_T >::get_index ( const Any oid,
INDEX_T &  ret 
) const
inline

◆ get_key()

template<typename INDEX_T >
Any gs::LFIndexer< INDEX_T >::get_key ( const INDEX_T &  index) const
inline

◆ get_keys()

template<typename INDEX_T >
const ColumnBase& gs::LFIndexer< INDEX_T >::get_keys ( ) const
inline

◆ get_type()

template<typename INDEX_T >
PropertyType gs::LFIndexer< INDEX_T >::get_type ( ) const
inline

◆ init()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::init ( const PropertyType type)
inline

◆ insert()

template<typename INDEX_T >
INDEX_T gs::LFIndexer< INDEX_T >::insert ( const Any oid)
inline

◆ load_meta()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::load_meta ( const std::string &  filename)
inline

◆ open()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::open ( const std::string &  name,
const std::string &  snapshot_dir,
const std::string &  work_dir 
)
inline

◆ open_in_memory()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::open_in_memory ( const std::string &  name)
inline

◆ open_with_hugepages()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::open_with_hugepages ( const std::string &  name,
bool  hugepage_table 
)
inline

◆ prefix()

template<typename INDEX_T >
static std::string gs::LFIndexer< INDEX_T >::prefix ( )
inlinestatic

◆ rehash()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::rehash ( size_t  size)
inline

◆ reserve()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::reserve ( size_t  size)
inline

◆ size()

template<typename INDEX_T >
size_t gs::LFIndexer< INDEX_T >::size ( ) const
inline

◆ warmup()

template<typename INDEX_T >
void gs::LFIndexer< INDEX_T >::warmup ( int  thread_num) const
inline

Friends And Related Function Documentation

◆ build_lf_indexer

template<typename INDEX_T >
template<typename _KEY_T , typename _INDEX_T >
void build_lf_indexer ( const IdIndexer< _KEY_T, _INDEX_T > &  input,
const std::string &  filename,
LFIndexer< _INDEX_T > &  output,
const std::string &  snapshot_dir,
const std::string &  work_dir,
PropertyType  type 
)
friend

Member Data Documentation

◆ hash_policy_

template<typename INDEX_T >
ska::ska::prime_number_hash_policy gs::LFIndexer< INDEX_T >::hash_policy_
private

◆ hasher_

template<typename INDEX_T >
GHash<Any> gs::LFIndexer< INDEX_T >::hasher_
private

◆ indices_

template<typename INDEX_T >
mmap_array<INDEX_T> gs::LFIndexer< INDEX_T >::indices_
private

◆ indices_size_

template<typename INDEX_T >
size_t gs::LFIndexer< INDEX_T >::indices_size_
private

◆ keys_

template<typename INDEX_T >
ColumnBase* gs::LFIndexer< INDEX_T >::keys_
private

◆ num_elements_

template<typename INDEX_T >
std::atomic<size_t> gs::LFIndexer< INDEX_T >::num_elements_
private

◆ num_slots_minus_one_

template<typename INDEX_T >
size_t gs::LFIndexer< INDEX_T >::num_slots_minus_one_
private

The documentation for this class was generated from the following file: