Versions in this module Expand all Collapse all v1 v1.3.3 Jun 11, 2020 Changes in this version + const CapNil + const Debug + const IntBits + const License + const Log2IntBits + const Log2WordBits + const MaxNSub + const Version + const WordBits + var Bitmaps = &BitmapPool + var ErrHeapOverflow = errors.New("heap overflow") + var ErrPoolTooLarge = errors.New("pool: too large") + var Logger = logger(nolog{}) + func DecodeAddress(x interface{}, address uint) (path []string, t reflect.Type) + func FibHeapTest() + func FlagStringer(n []string, x Word) string + func FlagStringerWithFormat(n []string, x Word, unknownFormat string) (s string) + func FuncName() (n string) + func HashTest() + func HeapTest() + func IsPow2(x Word) bool + func MaxLog2(x Word) uint + func MinLog2(x Word) uint + func MmapSlice(addr, length, prot, flags, fd, offset uintptr) (a uintptr, b []byte, err error) + func MmapSliceAligned(log2_size, log2_align uint, flags, prot uintptr) (a uintptr, b []byte, err error) + func Munmap(b []byte) (err error) + func NLeadingZeros(x Word) uint + func NSetBits(y Word) uint + func NextResizeCap(x uint) uint + func PointerAdd(p unsafe.Pointer, i uintptr) unsafe.Pointer + func PointerPoison(p unsafe.Pointer, n uintptr) + func SparseTest() + func Stringer(n []string, i int) string + func StringerHex(n []string, i int) string + func StringerWithFormat(n []string, i int, unknownFormat string) string + func Tabulate(x interface{}) (tab *table) + func TabulateWrite(w io.Writer, x interface{}) + func UnalignedUint16(p unsafe.Pointer, i uintptr) uint16 + func UnalignedUint32(p unsafe.Pointer, i uintptr) uint32 + func UnalignedUint64(p unsafe.Pointer, i uintptr) uint64 + func WithDefaultNamespace(f func() (err error)) (err error) — linux/amd64 + func WithNamespace(new_ns_fd, old_ns_fd, namespace_type int, f func() (err error)) (err error, first_setns_errno syscall.Errno) — linux/amd64 + type BitCompressUint64 struct + func (s *BitCompressUint64) Compress(x uint64) (r uint64) + func (s *BitCompressUint64) Mask() uint64 + func (s *BitCompressUint64) SetMask(mask uint64) + type Bitmap Word + func (b Bitmap) AndNot(c Bitmap) Bitmap + func (b Bitmap) AndNotx(x uint) Bitmap + func (b Bitmap) Dup() Bitmap + func (b Bitmap) ForeachSetBit(fn func(uint)) + func (b Bitmap) Free() Bitmap + func (b Bitmap) Get(x uint) bool + func (b Bitmap) GetMultiple(x, n_bits uint) (v Word) + func (b Bitmap) HexString() string + func (b Bitmap) Invert(x uint) Bitmap + func (b Bitmap) Invert2(x uint) (Bitmap, bool) + func (b Bitmap) Next(px *uint) bool + func (b Bitmap) Or(c Bitmap) Bitmap + func (b Bitmap) Orx(x uint) Bitmap + func (b Bitmap) Set(x uint) Bitmap + func (b Bitmap) Set2(x uint) (Bitmap, bool) + func (b Bitmap) SetMultiple(x, n_bits uint, new_value Word) (r Bitmap, old_value Word) + func (b Bitmap) String() string + type BitmapPool struct + func (p *BitmapPool) AndNot(b Bitmap, c Bitmap) (r Bitmap) + func (p *BitmapPool) AndNotx(b Bitmap, x uint) (r Bitmap) + func (p *BitmapPool) Dup(b Bitmap) Bitmap + func (p *BitmapPool) Elts() uint + func (p *BitmapPool) Foreach(f func(x WordVec)) + func (p *BitmapPool) ForeachIndex(f func(i uint)) + func (p *BitmapPool) ForeachSetBit(b Bitmap, fn func(uint)) + func (p *BitmapPool) Free(b Bitmap) Bitmap + func (p *BitmapPool) Get(b Bitmap, x uint) (v bool) + func (p *BitmapPool) GetIndex() (i uint) + func (p *BitmapPool) HexString(b Bitmap) string + func (p *BitmapPool) Invert(b Bitmap, x uint) (r Bitmap) + func (p *BitmapPool) Invert2(b Bitmap, x uint) (r Bitmap, v bool) + func (p *BitmapPool) IsFree(i uint) (v bool) + func (p *BitmapPool) Len() uint + func (p *BitmapPool) Next(b Bitmap, px *uint) (ok bool) + func (p *BitmapPool) Or(b Bitmap, c Bitmap) (r Bitmap) + func (p *BitmapPool) Orx(b Bitmap, x uint) (r Bitmap) + func (p *BitmapPool) PutIndex(i uint) (ok bool) + func (p *BitmapPool) Reset() + func (p *BitmapPool) Resize(n uint) + func (p *BitmapPool) Set(b Bitmap, x uint) (r Bitmap) + func (p *BitmapPool) Set2(b Bitmap, x uint) (r Bitmap, v bool) + func (p *BitmapPool) String(b Bitmap) string + func (p *BitmapPool) Unset(b Bitmap, x uint) (r Bitmap) + func (p *BitmapPool) Unset2(b Bitmap, x uint) (r Bitmap, old bool) + func (p *BitmapPool) Validate(i uint) + type BitmapVec []Bitmap + func (p *BitmapVec) ResetLen() + func (p *BitmapVec) Resize(n uint) + func (p *BitmapVec) Validate(i uint) *Bitmap + func (p *BitmapVec) ValidateInit(i uint, zero Bitmap) *Bitmap + func (p *BitmapVec) ValidateLen(l uint) (v *Bitmap) + func (p *BitmapVec) ValidateLenInit(l uint, zero Bitmap) (v *Bitmap) + func (p BitmapVec) Len() uint + type BitmapsVec [][]BitmapVec + func (p *BitmapsVec) ResetLen() + func (p *BitmapsVec) Resize(n uint) + func (p *BitmapsVec) Validate(i uint) *[]BitmapVec + func (p *BitmapsVec) ValidateInit(i uint, zero []BitmapVec) *[]BitmapVec + func (p *BitmapsVec) ValidateLen(l uint) (v *[]BitmapVec) + func (p *BitmapsVec) ValidateLenInit(l uint, zero []BitmapVec) (v *[]BitmapVec) + func (p BitmapsVec) Len() uint + type ByteVec []byte + func (p *ByteVec) ResetLen() + func (p *ByteVec) Resize(n uint) + func (p *ByteVec) Validate(i uint) *byte + func (p *ByteVec) ValidateInit(i uint, zero byte) *byte + func (p *ByteVec) ValidateLen(l uint) (v *byte) + func (p *ByteVec) ValidateLenInit(l uint, zero byte) (v *byte) + func (p ByteVec) Len() uint + type Cap uint + func (c Cap) IsValid() bool + func (c Cap) Log2() (i, j Cap) + func (c Cap) Next() Cap + func (c Cap) NextUnit(log2Min, log2Unit Cap) (n Cap) + func (c Cap) Pow2() (i, j Cap) + func (n Cap) Round(log2Unit Cap) Cap + type Count int + func (t *Count) Set(s string) (err error) + func (t *Count) String() string + type FibHeap struct + func (f *FibHeap) Add(xi uint) + func (f *FibHeap) Del(i uint) + func (f *FibHeap) Merge(g *FibHeap) + func (f *FibHeap) Min(data Ordered) (minu uint, valid bool) + func (f *FibHeap) String() string + func (f *FibHeap) Update(xi uint) + type Float32Vec []float32 + func (p *Float32Vec) ResetLen() + func (p *Float32Vec) Resize(n uint) + func (p *Float32Vec) Validate(i uint) *float32 + func (p *Float32Vec) ValidateInit(i uint, zero float32) *float32 + func (p *Float32Vec) ValidateLen(l uint) (v *float32) + func (p *Float32Vec) ValidateLenInit(l uint, zero float32) (v *float32) + func (p Float32Vec) Len() uint + type Float64Vec []float64 + func (p *Float64Vec) ResetLen() + func (p *Float64Vec) Resize(n uint) + func (p *Float64Vec) Validate(i uint) *float64 + func (p *Float64Vec) ValidateInit(i uint, zero float64) *float64 + func (p *Float64Vec) ValidateLen(l uint) (v *float64) + func (p *Float64Vec) ValidateLenInit(l uint, zero float64) (v *float64) + func (p Float64Vec) Len() uint + type Hash struct + Hasher Hasher + func (h *Hash) Cap() uint + func (h *Hash) Clear() + func (h *Hash) Elts() uint + func (h *Hash) ForeachIndex(f func(i uint)) + func (h *Hash) Get(k HasherKey) (i uint, ok bool) + func (h *Hash) Init(r Hasher, cap uint) + func (h *Hash) IsFree(i uint) bool + func (h *Hash) NextIndex(i uint) uint + func (h *Hash) RandIndex() uint + func (h *Hash) Set(k HasherKey) (i uint, exists bool) + func (h *Hash) String() string + func (h *Hash) Unset(k HasherKey) (i uint, ok bool) + type HashResizeCopy struct + Dst uint + Src uint + type HashState [2]hash64 + func (s *HashState) Finalize(h0, h1, h2, h3 hash64) + func (s *HashState) HashPointer(p unsafe.Pointer, size uintptr) + func (s *HashState) HashUint64(x0, x1, x2, x3 uint64) + func (s *HashState) Init() (hash64, hash64, hash64, hash64) + func (s *HashState) MixPointer(h0, h1, h2, h3 hash64, p unsafe.Pointer, size uintptr) (hash64, hash64, hash64, hash64) + func (s *HashState) MixUint64(h0, h1, h2, h3 hash64, x0, x1, x2, x3 uint64) (hash64, hash64, hash64, hash64) + type Hasher interface + HashIndex func(s *HashState, i uint) + HashResize func(newCap uint, copies []HashResizeCopy) + type HasherKey interface + HashKey func(s *HashState) + HashKeyEqual func(h Hasher, i uint) bool + type Heap struct + func (heap *Heap) Foreach(f func(offset, len uint)) + func (heap *Heap) Get(size uint) (id Index, offset uint) + func (heap *Heap) GetAligned(sizeArg, log2Alignment uint) (id Index, offset uint) + func (heap *Heap) GetID(ei Index) (offset, len int) + func (heap *Heap) GetMaxLen() uint + func (heap *Heap) GetUsage() (u HeapUsage) + func (heap *Heap) IsFree(ei Index) bool + func (heap *Heap) Len(ei Index) uint + func (heap *Heap) Put(ei Index) + func (heap *Heap) SetMaxLen(l uint) + func (heap *Heap) String() (s string) + type HeapUsage struct + Free uint64 + Used uint64 + type Index uint32 + const MaxIndex + type Int16Vec []int16 + func (p *Int16Vec) ResetLen() + func (p *Int16Vec) Resize(n uint) + func (p *Int16Vec) Validate(i uint) *int16 + func (p *Int16Vec) ValidateInit(i uint, zero int16) *int16 + func (p *Int16Vec) ValidateLen(l uint) (v *int16) + func (p *Int16Vec) ValidateLenInit(l uint, zero int16) (v *int16) + func (p Int16Vec) Len() uint + type Int32Vec []int32 + func (p *Int32Vec) ResetLen() + func (p *Int32Vec) Resize(n uint) + func (p *Int32Vec) Validate(i uint) *int32 + func (p *Int32Vec) ValidateInit(i uint, zero int32) *int32 + func (p *Int32Vec) ValidateLen(l uint) (v *int32) + func (p *Int32Vec) ValidateLenInit(l uint, zero int32) (v *int32) + func (p Int32Vec) Len() uint + type Int64Vec []int64 + func (p *Int64Vec) ResetLen() + func (p *Int64Vec) Resize(n uint) + func (p *Int64Vec) Validate(i uint) *int64 + func (p *Int64Vec) ValidateInit(i uint, zero int64) *int64 + func (p *Int64Vec) ValidateLen(l uint) (v *int64) + func (p *Int64Vec) ValidateLenInit(l uint, zero int64) (v *int64) + func (p Int64Vec) Len() uint + type Int8Vec []int8 + func (p *Int8Vec) ResetLen() + func (p *Int8Vec) Resize(n uint) + func (p *Int8Vec) Validate(i uint) *int8 + func (p *Int8Vec) ValidateInit(i uint, zero int8) *int8 + func (p *Int8Vec) ValidateLen(l uint) (v *int8) + func (p *Int8Vec) ValidateLenInit(l uint, zero int8) (v *int8) + func (p Int8Vec) Len() uint + type Lines []string + func (l *Lines) Add(s string) + func (l Lines) Indent(indent uint) (s string) + type MemHeap struct + func (h *MemHeap) Data(o uint) unsafe.Pointer + func (h *MemHeap) Get(n uint) (b []byte, id Index, offset, cap uint) + func (h *MemHeap) GetAligned(n, log2Align uint) (b []byte, id Index, offset, cap uint) + func (h *MemHeap) GetId(id Index) (b []byte) + func (h *MemHeap) Init(n uint) (err error) + func (h *MemHeap) InitData(b []byte) + func (h *MemHeap) Offset(b []byte) uint + func (h *MemHeap) OffsetValid(o uint) bool + func (h *MemHeap) Put(id Index) + func (h *MemHeap) String() string + type MemorySize uint64 + func (s MemorySize) String() (v string) + type Ordered interface + Compare func(i, j int) int + type Pool struct + func (p *Pool) FreeLen() uint + func (p *Pool) GetIndex(max uint) (i uint) + func (p *Pool) IsFree(i uint) (ok bool) + func (p *Pool) MaxLen() uint + func (p *Pool) PutIndex(i uint) (ok bool) + func (p *Pool) Reset() + func (p *Pool) SetMaxLen(x uint) + type Sparse struct + func (s *Sparse) Get(sparse Index) (dense Index, valid bool) + func (s *Sparse) Set(sparse Index) (dense Index) + func (s *Sparse) String() string + func (s *Sparse) Unset(sparse Index) (valid bool) + type StringPool struct + Strings []string + func (p *StringPool) Elts() uint + func (p *StringPool) Foreach(f func(x string)) + func (p *StringPool) ForeachIndex(f func(i uint)) + func (p *StringPool) GetIndex() (i uint) + func (p *StringPool) IsFree(i uint) (v bool) + func (p *StringPool) Len() uint + func (p *StringPool) PutIndex(i uint) (ok bool) + func (p *StringPool) Reset() + func (p *StringPool) Resize(n uint) + func (p *StringPool) Validate(i uint) + type StringVec []string + func (p *StringVec) ResetLen() + func (p *StringVec) Resize(n uint) + func (p *StringVec) Validate(i uint) *string + func (p *StringVec) ValidateInit(i uint, zero string) *string + func (p *StringVec) ValidateLen(l uint) (v *string) + func (p *StringVec) ValidateLenInit(l uint, zero string) (v *string) + func (p StringVec) Len() uint + type TypedPool struct + func (p *TypedPool) Data(i TypedPoolIndex) (t TypedPoolType, x unsafe.Pointer) + func (p *TypedPool) FreeLen() uint + func (p *TypedPool) GetData(t TypedPoolType, i TypedPoolIndex) unsafe.Pointer + func (p *TypedPool) GetIndex(typ TypedPoolType) (i TypedPoolIndex) + func (p *TypedPool) Init(args ...interface{}) + func (p *TypedPool) IsFree(i uint) (ok bool) + func (p *TypedPool) IsInitialized() bool + func (p *TypedPool) MaxLen() uint + func (p *TypedPool) PutIndex(t TypedPoolType, i TypedPoolIndex) (ok bool) + func (p *TypedPool) SetMaxLen(x uint) + type TypedPoolIndex uint32 + type TypedPoolType uint32 + type Uint16Vec []uint16 + func (p *Uint16Vec) ResetLen() + func (p *Uint16Vec) Resize(n uint) + func (p *Uint16Vec) Validate(i uint) *uint16 + func (p *Uint16Vec) ValidateInit(i uint, zero uint16) *uint16 + func (p *Uint16Vec) ValidateLen(l uint) (v *uint16) + func (p *Uint16Vec) ValidateLenInit(l uint, zero uint16) (v *uint16) + func (p Uint16Vec) Len() uint + type Uint32Vec []uint32 + func (p *Uint32Vec) ResetLen() + func (p *Uint32Vec) Resize(n uint) + func (p *Uint32Vec) Validate(i uint) *uint32 + func (p *Uint32Vec) ValidateInit(i uint, zero uint32) *uint32 + func (p *Uint32Vec) ValidateLen(l uint) (v *uint32) + func (p *Uint32Vec) ValidateLenInit(l uint, zero uint32) (v *uint32) + func (p Uint32Vec) Len() uint + type Uint64Vec []uint64 + func (p *Uint64Vec) ResetLen() + func (p *Uint64Vec) Resize(n uint) + func (p *Uint64Vec) Validate(i uint) *uint64 + func (p *Uint64Vec) ValidateInit(i uint, zero uint64) *uint64 + func (p *Uint64Vec) ValidateLen(l uint) (v *uint64) + func (p *Uint64Vec) ValidateLenInit(l uint, zero uint64) (v *uint64) + func (p Uint64Vec) Len() uint + type Uint8Vec []uint8 + func (p *Uint8Vec) ResetLen() + func (p *Uint8Vec) Resize(n uint) + func (p *Uint8Vec) Validate(i uint) *uint8 + func (p *Uint8Vec) ValidateInit(i uint, zero uint8) *uint8 + func (p *Uint8Vec) ValidateLen(l uint) (v *uint8) + func (p *Uint8Vec) ValidateLenInit(l uint, zero uint8) (v *uint8) + func (p Uint8Vec) Len() uint + type Word uintptr + func FirstSet(x Word) Word + func MaxPow2(x Word) Word + func NextSet(x Word) (v Word, i int) + func RoundCacheLine(x Word) Word + func RoundPow2(x, p Word) Word + func (i Word) BitmapIndex() (Word, Word) + func (x Word) FirstSet() Word + func (x Word) ForeachSetBit(fn func(i uint)) + func (x Word) IsPow2() bool + func (x Word) MaxLog2() uint + func (x Word) MaxPow2() Word + func (x Word) MinLog2() uint + func (x Word) NLeadingZeros() uint + func (x Word) NSetBits() uint + func (x Word) NextSet() (Word, int) + func (x Word) RoundCacheLine() Word + func (x Word) RoundPow2(p Word) Word + type WordVec []Word + func (bm *WordVec) Alloc(nBits uint) + func (bm *WordVec) GetMultiple(x, n_bits uint) (v Word) + func (bm *WordVec) SetMultiple(x, n_bits uint, new_value Word) (old_value Word) + func (bm WordVec) GetBit(x uint) (v bool) + func (bm WordVec) SetBit(x uint, v bool) (oldValue bool) + func (bm WordVec) UnsetBit(x uint) (v bool) + func (p *WordVec) ResetLen() + func (p *WordVec) Resize(n uint) + func (p *WordVec) Validate(i uint) *Word + func (p *WordVec) ValidateInit(i uint, zero Word) *Word + func (p *WordVec) ValidateLen(l uint) (v *Word) + func (p *WordVec) ValidateLenInit(l uint, zero Word) (v *Word) + func (p WordVec) Len() uint