libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
GblHashSet Struct Reference

#include <gimbal_hash_set.h>

Inheritance diagram for GblHashSet:
gbl::HashSet< std::pair< const K, T >, impl::HashMapHasherAdapter< K, T, std::hash< K > >, impl::HashMapEqualToAdapter< K, T, std::equal_to< K > > > gbl::HashSet< K, H, P > gbl::HashMap< K, T, H, P >

Data Fields

struct { 
 
   GblContext *   pCtx 
 
   size_t   entrySize 
 
   size_t   capacity 
 
   GblHashSetHashFn   pFnHash 
 
   GblHashSetCmpFn   pFnCompare 
 
   GblHashSetDtorFn   pFnDestruct 
 
   size_t   bucketSize 
 
   size_t   bucketCount 
 
   size_t   count 
 
   size_t   mask 
 
   void *   pBuckets 
 
   void *   pSpare 
 
   void *   pUserdata 
 
private_ 
 

Detailed Description

Hash-table based abstract associative container with C++-style STL std::unoredered_set API.

GblHashSet uses open-addressing ans is implemented using a Robin Hood hashing algorithm. Using it requires providing a custom hasher function (which typically uses one of the libGimbal hashing algorithms such as gblHashMurmur()) as well as a custom comparator function.

Note
Performance is pretty darn good. Read speed is faster than both C++'s std::unordered_pSelf and Qt's QHash (despite being runtime polymorphic with C function pointers) while write speed is slightly slower than both.

Definition at line 39 of file gimbal_hash_set.h.

Field Documentation

◆ pCtx

GblContext* GblHashSet::pCtx

Definition at line 41 of file gimbal_hash_set.h.

◆ entrySize

size_t GblHashSet::entrySize

Definition at line 42 of file gimbal_hash_set.h.

◆ capacity

size_t GblHashSet::capacity

Definition at line 43 of file gimbal_hash_set.h.

◆ pFnHash

GblHashSetHashFn GblHashSet::pFnHash

Definition at line 44 of file gimbal_hash_set.h.

◆ pFnCompare

GblHashSetCmpFn GblHashSet::pFnCompare

Definition at line 45 of file gimbal_hash_set.h.

◆ pFnDestruct

GblHashSetDtorFn GblHashSet::pFnDestruct

Definition at line 46 of file gimbal_hash_set.h.

◆ bucketSize

size_t GblHashSet::bucketSize

Definition at line 47 of file gimbal_hash_set.h.

◆ bucketCount

size_t GblHashSet::bucketCount

Definition at line 48 of file gimbal_hash_set.h.

◆ count

size_t GblHashSet::count

Definition at line 49 of file gimbal_hash_set.h.

◆ mask

size_t GblHashSet::mask

Definition at line 50 of file gimbal_hash_set.h.

◆ pBuckets

void* GblHashSet::pBuckets

Definition at line 51 of file gimbal_hash_set.h.

◆ pSpare

void* GblHashSet::pSpare

Definition at line 52 of file gimbal_hash_set.h.

◆ pUserdata

void* GblHashSet::pUserdata

Definition at line 53 of file gimbal_hash_set.h.


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