hashtable

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Int64BatchHash           = wyhashInt64Batch
	Int64HashWithFixedSeed   = wyhash64WithFixedSeed
	BytesBatchGenHashStates  = wyhashBytesBatch
	Int192BatchGenHashStates = wyhashInt192Batch
	Int256BatchGenHashStates = wyhashInt256Batch
	Int320BatchGenHashStates = wyhashInt320Batch
)
View Source
var StrKeyPadding [16]byte

Functions

This section is empty.

Types

type Aggregator

type Aggregator interface {
	StateSize() uint8
	ResultSize() uint8
	NeedsInit() bool

	Init(state unsafe.Pointer)
	AddBatch(states []unsafe.Pointer, values unsafe.Pointer)
	MergeBatch(lstates, rstates []unsafe.Pointer)

	Finalize(states, results []unsafe.Pointer)
}

type FixedMap

type FixedMap struct {
	// contains filtered or unexported fields
}

func (*FixedMap) Cardinality

func (ht *FixedMap) Cardinality() uint64

func (*FixedMap) Cells

func (ht *FixedMap) Cells() []uint64

func (*FixedMap) Init

func (ht *FixedMap) Init(cellCnt uint32)

func (*FixedMap) Insert

func (ht *FixedMap) Insert(key uint32) uint64

type FixedMapIterator

type FixedMapIterator struct {
	// contains filtered or unexported fields
}

func (*FixedMapIterator) Init

func (it *FixedMapIterator) Init(ht *FixedMap)

func (*FixedMapIterator) Next

func (it *FixedMapIterator) Next() (key uint32, value uint64, err error)

type FixedSet

type FixedSet struct {
	// contains filtered or unexported fields
}

func (*FixedSet) Cardinality

func (ht *FixedSet) Cardinality() (cnt uint64)

func (*FixedSet) Init

func (ht *FixedSet) Init(cellCnt uint32)

func (*FixedSet) Insert

func (ht *FixedSet) Insert(key uint32) (inserted bool)

func (*FixedSet) Merge

func (ht *FixedSet) Merge(other *FixedSet)

type FixedSetIterator

type FixedSetIterator struct {
	// contains filtered or unexported fields
}

func (*FixedSetIterator) Init

func (it *FixedSetIterator) Init(ht *FixedSet)

func (*FixedSetIterator) Next

func (it *FixedSetIterator) Next() (key uint32, err error)

type Int64HashMap

type Int64HashMap struct {
	// contains filtered or unexported fields
}

func (*Int64HashMap) Cardinality

func (ht *Int64HashMap) Cardinality() uint64

func (*Int64HashMap) FindBatch

func (ht *Int64HashMap) FindBatch(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64)

func (*Int64HashMap) FindBatchInBucket added in v0.6.0

func (ht *Int64HashMap) FindBatchInBucket(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, inBuckets []uint8, ibucket, nbucket uint64)

func (*Int64HashMap) FindBatchWithRing

func (ht *Int64HashMap) FindBatchWithRing(n int, zValues []int64, hashes []uint64, keysPtr unsafe.Pointer, values []uint64)

func (*Int64HashMap) FindBatchWithRingInBucket added in v0.6.0

func (ht *Int64HashMap) FindBatchWithRingInBucket(n int, zValues []int64, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, inBuckets []uint8, ibucket, nbucket uint64)

func (*Int64HashMap) Free added in v0.6.0

func (ht *Int64HashMap) Free(m *mpool.MPool)

func (*Int64HashMap) Init

func (ht *Int64HashMap) Init(m *mpool.MPool) (err error)

func (*Int64HashMap) InsertBatch

func (ht *Int64HashMap) InsertBatch(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, m *mpool.MPool) error

func (*Int64HashMap) InsertBatchInBucket added in v0.6.0

func (ht *Int64HashMap) InsertBatchInBucket(n int, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, ibucket, nbucket uint64, m *mpool.MPool) error

func (*Int64HashMap) InsertBatchWithRing

func (ht *Int64HashMap) InsertBatchWithRing(n int, zValues []int64, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, m *mpool.MPool) error

func (*Int64HashMap) InsertBatchWithRingInBucket added in v0.6.0

func (ht *Int64HashMap) InsertBatchWithRingInBucket(n int, zValues []int64, hashes []uint64, keysPtr unsafe.Pointer, values []uint64, ibucket, nbucket uint64, m *mpool.MPool) error

func (*Int64HashMap) ResizeOnDemand added in v1.0.0

func (ht *Int64HashMap) ResizeOnDemand(n int, m *mpool.MPool) error

func (*Int64HashMap) Size added in v0.7.0

func (ht *Int64HashMap) Size() int64

type Int64HashMapCell

type Int64HashMapCell struct {
	Key    uint64
	Mapped uint64
}

type Int64HashMapIterator

type Int64HashMapIterator struct {
	// contains filtered or unexported fields
}

func (*Int64HashMapIterator) Init

func (it *Int64HashMapIterator) Init(ht *Int64HashMap)

func (*Int64HashMapIterator) Next

func (it *Int64HashMapIterator) Next() (cell *Int64HashMapCell, err error)

type StringHashMap

type StringHashMap struct {
	// contains filtered or unexported fields
}

func (*StringHashMap) Cardinality

func (ht *StringHashMap) Cardinality() uint64

func (*StringHashMap) FindHashStateBatch

func (ht *StringHashMap) FindHashStateBatch(states [][3]uint64, values []uint64)

func (*StringHashMap) FindString24Batch

func (ht *StringHashMap) FindString24Batch(states [][3]uint64, keys [][3]uint64, values []uint64)

func (*StringHashMap) FindString32Batch

func (ht *StringHashMap) FindString32Batch(states [][3]uint64, keys [][4]uint64, values []uint64)

func (*StringHashMap) FindString40Batch

func (ht *StringHashMap) FindString40Batch(states [][3]uint64, keys [][5]uint64, values []uint64)

func (*StringHashMap) FindStringBatch

func (ht *StringHashMap) FindStringBatch(states [][3]uint64, keys [][]byte, values []uint64)

func (*StringHashMap) FindStringBatchInBucket added in v0.6.0

func (ht *StringHashMap) FindStringBatchInBucket(states [][3]uint64, keys [][]byte, values []uint64, inBuckets []uint8, ibucket, nbucket uint64)

func (*StringHashMap) FindStringBatchWithRing

func (ht *StringHashMap) FindStringBatchWithRing(states [][3]uint64, zValues []int64, keys [][]byte, values []uint64)

func (*StringHashMap) FindStringBatchWithRingInBucket added in v0.6.0

func (ht *StringHashMap) FindStringBatchWithRingInBucket(states [][3]uint64, zValues []int64, keys [][]byte, values []uint64, inBuckets []uint8, ibucket, nbucket uint64)

func (*StringHashMap) Free added in v0.6.0

func (ht *StringHashMap) Free(m *mpool.MPool)

func (*StringHashMap) Init

func (ht *StringHashMap) Init(m *mpool.MPool) (err error)

func (*StringHashMap) InsertStringBatch

func (ht *StringHashMap) InsertStringBatch(states [][3]uint64, keys [][]byte, values []uint64, m *mpool.MPool) error

func (*StringHashMap) InsertStringBatchInBucket added in v0.6.0

func (ht *StringHashMap) InsertStringBatchInBucket(states [][3]uint64, keys [][]byte, values []uint64, ibucket, nbucket uint64, m *mpool.MPool) error

func (*StringHashMap) InsertStringBatchWithRing

func (ht *StringHashMap) InsertStringBatchWithRing(zValues []int64, states [][3]uint64, keys [][]byte, values []uint64, m *mpool.MPool) error

func (*StringHashMap) InsertStringBatchWithRingInBucket added in v0.6.0

func (ht *StringHashMap) InsertStringBatchWithRingInBucket(zValues []int64, states [][3]uint64, keys [][]byte, values []uint64, ibucket, nbucket uint64, m *mpool.MPool) error

func (*StringHashMap) ResizeOnDemand added in v1.0.0

func (ht *StringHashMap) ResizeOnDemand(n uint64, m *mpool.MPool) error

func (*StringHashMap) Size added in v0.7.0

func (ht *StringHashMap) Size() int64

type StringHashMapCell

type StringHashMapCell struct {
	HashState [3]uint64
	Mapped    uint64
}

type StringHashMapIterator

type StringHashMapIterator struct {
	// contains filtered or unexported fields
}

func (*StringHashMapIterator) Init

func (it *StringHashMapIterator) Init(ht *StringHashMap)

func (*StringHashMapIterator) Next

func (it *StringHashMapIterator) Next() (cell *StringHashMapCell, err error)

type StringRef

type StringRef struct {
	Ptr *byte
	Len int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL