Documentation
¶
Overview ¶
Package elib is a collection of data structures: bitmaps, pools, heaps, fifos.
Index ¶
- Constants
- Variables
- 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)
- func WithNamespace(new_ns_fd, old_ns_fd, namespace_type int, f func() (err error)) (err error, first_setns_errno syscall.Errno)
- type BitCompressUint64
- type Bitmap
- 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
- 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
- func (p BitmapVec) Len() uint
- 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)
- type BitmapsVec
- func (p BitmapsVec) Len() uint
- 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)
- type ByteVec
- type Cap
- type Count
- type FibHeap
- type Float32Vec
- func (p Float32Vec) Len() uint
- 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)
- type Float64Vec
- func (p Float64Vec) Len() uint
- 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)
- type Hash
- 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
- type HashState
- 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
- type HasherKey
- type Heap
- 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
- type Index
- type Int16Vec
- func (p Int16Vec) Len() uint
- 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)
- type Int32Vec
- func (p Int32Vec) Len() uint
- 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)
- type Int64Vec
- func (p Int64Vec) Len() uint
- 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)
- type Int8Vec
- type Lines
- type MemHeap
- 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
- type Ordered
- type Pool
- type Sparse
- type StringPool
- 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
- func (p StringVec) Len() uint
- 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)
- type TypedPool
- 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
- type TypedPoolType
- type Uint16Vec
- func (p Uint16Vec) Len() uint
- 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)
- type Uint32Vec
- func (p Uint32Vec) Len() uint
- 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)
- type Uint64Vec
- func (p Uint64Vec) Len() uint
- 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)
- type Uint8Vec
- func (p Uint8Vec) Len() uint
- 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)
- type 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
- func (bm *WordVec) Alloc(nBits uint)
- func (bm WordVec) GetBit(x uint) (v bool)
- func (bm *WordVec) GetMultiple(x, n_bits uint) (v Word)
- func (p WordVec) Len() uint
- func (p *WordVec) ResetLen()
- func (p *WordVec) Resize(n uint)
- func (bm WordVec) SetBit(x uint, v bool) (oldValue bool)
- func (bm *WordVec) SetMultiple(x, n_bits uint, new_value Word) (old_value Word)
- func (bm WordVec) UnsetBit(x uint) (v bool)
- 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)
Constants ¶
const ( Log2WordBits = 3 + (_m>>8&1 + _m>>16&1 + _m>>32&1) WordBits = 1 << Log2WordBits Log2IntBits = 3 + (_n>>8&1 + _n>>16&1 + _n>>32&1) IntBits = 1 << Log2IntBits )
const CapNil = ^Cap(0)
const Debug = false
const License = `` /* 15871-byte string literal not displayed */
const (
MaxNSub = 32
)
const Version = "v1.3.2"
Version format :: v<MAJOR>.<MINOR>.<PATCH>[-rc<CANDIDATE>]
Variables ¶
var Bitmaps = &BitmapPool{}
var ErrHeapOverflow = errors.New("heap overflow")
var ErrPoolTooLarge = errors.New("pool: too large")
ErrTooLarge is passed to panic if pool overflows maxLen
var Logger = logger(nolog{})
Functions ¶
func DecodeAddress ¶
func FibHeapTest ¶
func FibHeapTest()
func FlagStringer ¶
func FlagStringerWithFormat ¶
func MmapSliceAligned ¶
func NLeadingZeros ¶
func NextResizeCap ¶
NextResizeCap gives next larger resizeable array capacity.
func PointerPoison ¶
func SparseTest ¶
func SparseTest()
func StringerHex ¶
func TabulateWrite ¶
func WithDefaultNamespace ¶
Performs given callback in default namespace (e.g. without setns).
Types ¶
type BitCompressUint64 ¶
type BitCompressUint64 struct {
// contains filtered or unexported fields
}
func (*BitCompressUint64) Compress ¶
func (s *BitCompressUint64) Compress(x uint64) (r uint64)
func (*BitCompressUint64) Mask ¶
func (s *BitCompressUint64) Mask() uint64
func (*BitCompressUint64) SetMask ¶
func (s *BitCompressUint64) SetMask(mask uint64)
type Bitmap ¶
type Bitmap Word
Bitmaps of <= 63 are stored as positive int64s. Negative int64s are indices into pool of all known bitmaps
func (Bitmap) ForeachSetBit ¶
func (Bitmap) GetMultiple ¶
func (Bitmap) SetMultiple ¶
type BitmapPool ¶
type BitmapPool struct { Pool // contains filtered or unexported fields }
func (*BitmapPool) Elts ¶
func (p *BitmapPool) Elts() uint
func (*BitmapPool) Foreach ¶
func (p *BitmapPool) Foreach(f func(x WordVec))
func (*BitmapPool) ForeachIndex ¶
func (p *BitmapPool) ForeachIndex(f func(i uint))
func (*BitmapPool) ForeachSetBit ¶
func (p *BitmapPool) ForeachSetBit(b Bitmap, fn func(uint))
func (*BitmapPool) Free ¶
func (p *BitmapPool) Free(b Bitmap) Bitmap
Free bitmap so it can be reused later. Returns zero bitmap.
func (*BitmapPool) GetIndex ¶
func (p *BitmapPool) GetIndex() (i uint)
func (*BitmapPool) HexString ¶
func (p *BitmapPool) HexString(b Bitmap) string
func (*BitmapPool) IsFree ¶
func (p *BitmapPool) IsFree(i uint) (v bool)
func (*BitmapPool) Len ¶
func (p *BitmapPool) Len() uint
func (*BitmapPool) PutIndex ¶
func (p *BitmapPool) PutIndex(i uint) (ok bool)
func (*BitmapPool) Reset ¶
func (p *BitmapPool) Reset()
func (*BitmapPool) Resize ¶
func (p *BitmapPool) Resize(n uint)
func (*BitmapPool) Set2 ¶
func (p *BitmapPool) Set2(b Bitmap, x uint) (r Bitmap, v bool)
Set2 sets bit X in given bitmap, possibly resizeing and returning new bitmap. Second return value is old value of bit X or false if bit is newly created.
func (*BitmapPool) String ¶
func (p *BitmapPool) String(b Bitmap) string
func (*BitmapPool) Validate ¶
func (p *BitmapPool) Validate(i uint)
type BitmapsVec ¶
type BitmapsVec [][]BitmapVec
func (BitmapsVec) Len ¶
func (p BitmapsVec) Len() uint
func (*BitmapsVec) ResetLen ¶
func (p *BitmapsVec) ResetLen()
func (*BitmapsVec) Resize ¶
func (p *BitmapsVec) Resize(n uint)
func (*BitmapsVec) Validate ¶
func (p *BitmapsVec) Validate(i uint) *[]BitmapVec
func (*BitmapsVec) ValidateInit ¶
func (p *BitmapsVec) ValidateInit(i uint, zero []BitmapVec) *[]BitmapVec
func (*BitmapsVec) ValidateLen ¶
func (p *BitmapsVec) ValidateLen(l uint) (v *[]BitmapVec)
func (*BitmapsVec) ValidateLenInit ¶
func (p *BitmapsVec) ValidateLenInit(l uint, zero []BitmapVec) (v *[]BitmapVec)
type Count ¶
type Count int
Count implements the Value interface so flags can be specified as either integer (1000000) or sometimes more conveniently as floating point (1e6).
type Float32Vec ¶
type Float32Vec []float32
func (Float32Vec) Len ¶
func (p Float32Vec) Len() uint
func (*Float32Vec) ResetLen ¶
func (p *Float32Vec) ResetLen()
func (*Float32Vec) Resize ¶
func (p *Float32Vec) Resize(n uint)
func (*Float32Vec) Validate ¶
func (p *Float32Vec) Validate(i uint) *float32
func (*Float32Vec) ValidateInit ¶
func (p *Float32Vec) ValidateInit(i uint, zero float32) *float32
func (*Float32Vec) ValidateLen ¶
func (p *Float32Vec) ValidateLen(l uint) (v *float32)
func (*Float32Vec) ValidateLenInit ¶
func (p *Float32Vec) ValidateLenInit(l uint, zero float32) (v *float32)
type Float64Vec ¶
type Float64Vec []float64
func (Float64Vec) Len ¶
func (p Float64Vec) Len() uint
func (*Float64Vec) ResetLen ¶
func (p *Float64Vec) ResetLen()
func (*Float64Vec) Resize ¶
func (p *Float64Vec) Resize(n uint)
func (*Float64Vec) Validate ¶
func (p *Float64Vec) Validate(i uint) *float64
func (*Float64Vec) ValidateInit ¶
func (p *Float64Vec) ValidateInit(i uint, zero float64) *float64
func (*Float64Vec) ValidateLen ¶
func (p *Float64Vec) ValidateLen(l uint) (v *float64)
func (*Float64Vec) ValidateLenInit ¶
func (p *Float64Vec) ValidateLenInit(l uint, zero float64) (v *float64)
type Hash ¶
type Hash struct { Hasher Hasher // contains filtered or unexported fields }
func (*Hash) ForeachIndex ¶
type HashResizeCopy ¶
type HashResizeCopy struct{ Src, Dst uint }
type HashState ¶
type HashState [2]hash64
func (*HashState) Finalize ¶
func (s *HashState) Finalize(h0, h1, h2, h3 hash64)
Finalize hash state.
func (*HashState) HashUint64 ¶
type Hasher ¶
type Hasher interface { // Compute hash for key with given index. HashIndex(s *HashState, i uint) // Hash has just been resized to new capacity. // Function must copy elements from old table to new table. HashResize(newCap uint, copies []HashResizeCopy) }
type Heap ¶
type Heap struct {
// contains filtered or unexported fields
}
A Heap maintains an allocator for arbitrary sized blocks of an underlying array. The array is not part of the Heap.
func (*Heap) GetAligned ¶
type MemHeap ¶
type MemHeap struct {
// contains filtered or unexported fields
}
Allocation heap of cache lines.
func (*MemHeap) GetAligned ¶
func (*MemHeap) OffsetValid ¶
type MemorySize ¶
type MemorySize uint64
func (MemorySize) String ¶
func (s MemorySize) String() (v string)
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
type Sparse ¶
type Sparse struct {
// contains filtered or unexported fields
}
Sparse arrays map sparse indices into dense indices.
type StringPool ¶
func (*StringPool) Elts ¶
func (p *StringPool) Elts() uint
func (*StringPool) Foreach ¶
func (p *StringPool) Foreach(f func(x string))
func (*StringPool) ForeachIndex ¶
func (p *StringPool) ForeachIndex(f func(i uint))
func (*StringPool) GetIndex ¶
func (p *StringPool) GetIndex() (i uint)
func (*StringPool) IsFree ¶
func (p *StringPool) IsFree(i uint) (v bool)
func (*StringPool) Len ¶
func (p *StringPool) Len() uint
func (*StringPool) PutIndex ¶
func (p *StringPool) PutIndex(i uint) (ok bool)
func (*StringPool) Reset ¶
func (p *StringPool) Reset()
func (*StringPool) Resize ¶
func (p *StringPool) Resize(n uint)
func (*StringPool) Validate ¶
func (p *StringPool) Validate(i uint)
type TypedPool ¶
type TypedPool struct {
// contains filtered or unexported fields
}
func (*TypedPool) Data ¶
func (p *TypedPool) Data(i TypedPoolIndex) (t TypedPoolType, x unsafe.Pointer)
func (*TypedPool) GetData ¶
func (p *TypedPool) GetData(t TypedPoolType, i TypedPoolIndex) unsafe.Pointer
func (*TypedPool) GetIndex ¶
func (p *TypedPool) GetIndex(typ TypedPoolType) (i TypedPoolIndex)
func (*TypedPool) IsInitialized ¶
func (*TypedPool) PutIndex ¶
func (p *TypedPool) PutIndex(t TypedPoolType, i TypedPoolIndex) (ok bool)
type TypedPoolIndex ¶
type TypedPoolIndex uint32
type TypedPoolType ¶
type TypedPoolType uint32
type Word ¶
type Word uintptr
Underlying machine word, typically 32 or 64 bits.
func RoundCacheLine ¶
func (Word) BitmapIndex ¶
Helper to index word sized bitmaps.
func (Word) ForeachSetBit ¶
func (Word) NLeadingZeros ¶
func (Word) RoundCacheLine ¶
type WordVec ¶
type WordVec []Word
func (*WordVec) GetMultiple ¶
Fetch bits I through I + N_BITS.
func (*WordVec) SetMultiple ¶
Give bits I through I + N_BITS to new value; return old value.
func (*WordVec) ValidateLen ¶
Source Files
¶
- bitmap.go
- bits.go
- cap.go
- count.go
- debug.go
- debug_no.go
- decode_address.go
- fibheap.go
- fibheap_debug.go
- gentemplate_pool_bitmap.go
- gentemplate_pool_string.go
- gentemplate_vec_bitmap.go
- gentemplate_vec_bitmapvec.go
- gentemplate_vec_byte.go
- gentemplate_vec_fibnode.go
- gentemplate_vec_float32.go
- gentemplate_vec_float64.go
- gentemplate_vec_freeelt.go
- gentemplate_vec_freeelts.go
- gentemplate_vec_int16.go
- gentemplate_vec_int32.go
- gentemplate_vec_int64.go
- gentemplate_vec_int8.go
- gentemplate_vec_randheapobj.go
- gentemplate_vec_randsparse.go
- gentemplate_vec_string.go
- gentemplate_vec_uint16.go
- gentemplate_vec_uint32.go
- gentemplate_vec_uint64.go
- gentemplate_vec_uint8.go
- gentemplate_vec_uipair.go
- gentemplate_vec_word.go
- hash.go
- hash_debug.go
- heap.go
- heap_debug.go
- license.go
- log.go
- mem.go
- mem_heap.go
- namespace.go
- pool.go
- sparse.go
- sparse_debug.go
- stringer.go
- tabulate.go
- typed_pool.go
- types.go
- version.go
Directories
¶
Path | Synopsis |
---|---|
Package srpc gives symmetric bi-directional RPC on top of GO rpc.
|
Package srpc gives symmetric bi-directional RPC on top of GO rpc. |
High speed event logging
|
High speed event logging |
Memory mapped register read/write
|
Memory mapped register read/write |
pci
Generic devices on PCI bus.
|
Generic devices on PCI bus. |
math
|
|