P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::hash_vector_base Class Referenceabstract
Inheritance diagram for P4::hash_vector_base:
[legend]

Classes

struct  internal
 
struct  lookup_cache
 

Protected Member Functions

 hash_vector_base (bool ismap, bool ismulti, size_t capacity)
 
 hash_vector_base (const hash_vector_base &)
 
 hash_vector_base (hash_vector_base &&)
 
void clear ()
 
virtual bool cmpfn (const void *, const void *) const =0
 
virtual bool cmpfn (const void *, size_t) const =0
 
size_t find (const void *key, lookup_cache *cache) const
 
size_t find_next (const void *key, lookup_cache *cache) const
 
virtual const void * getkey (uint32_t) const =0
 
virtual void * getval (uint32_t)=0
 
virtual size_t hashfn (const void *) const =0
 
size_t hv_insert (const void *key, lookup_cache *cache=nullptr)
 
virtual uint32_t limit ()=0
 
void * lookup (const void *key, lookup_cache *cache=nullptr)
 
void * lookup_next (const void *key, lookup_cache *cache=nullptr)
 
virtual void moveentry (size_t, size_t)=0
 
hash_vector_baseoperator= (const hash_vector_base &)
 
hash_vector_baseoperator= (hash_vector_base &&)
 
void redo_hash ()
 
size_t remove (const void *key, lookup_cache *cache=nullptr)
 
virtual void resizedata (size_t)=0
 

Protected Attributes

bitvec erased
 
size_t inuse
 

Class Documentation

◆ P4::hash_vector_base::internal

struct P4::hash_vector_base::internal
Class Members
uint32_t(*)(const hash_vector_base *, size_t) gethash
char hashelsize
char ismap
char ismulti
size_t maxset
void(*)(hash_vector_base *, size_t, uint32_t) sethash