Skip to content

Latest commit

 

History

History
171 lines (119 loc) · 5.09 KB

doc.md

File metadata and controls

171 lines (119 loc) · 5.09 KB

filter

import "github.com/intel/ixl-go/filter"

Package filter provides some functions for processing parquet RLE or bitpacked data or uint array.

Index

func Expand

func Expand[T DataUnit](s *Context, data []T, set BitSet) (result []T, err error)

Expand generates an array in which the elements in the data are placed according to 1 bits in the set.

func ExtractRLE[T DataUnit](s *Context, size int, data []byte, r Range[uint32]) (result []T, err error)

ExtractRLE extract specified range of data.

func Ready

func Ready() bool

Ready returns true if the device is ready

func Select

func Select[T DataUnit](s *Context, data []T, set BitSet) (result []T, err error)

Select selects the elements in the data whose indices correspond to 1-bits in the set

type BitSet

BitSet is a fixed-size collection of bits that can be manipulated individually. It is a data structure that is used to represent a set of elements, where each element is represented by a single bit.

type BitSet []byte

func Scan

func Scan[R DataUnit](s *Context, input []R, r Range[R]) (output BitSet, err error)

Scan scans the input for values within the specified range

func (BitSet) OnesCount

func (b BitSet) OnesCount() int

OnesCount returns the number of one bits ("population count") in b.

func (BitSet) Size

func (b BitSet) Size() int

Size return the min bitset size

func (BitSet) String

func (b BitSet) String() string

String returns a string representation of the bit set

type Context

Context is used to store filters state.

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

func NewContext() (*Context, error)

NewContext returns a new context

func (*Context) ScanBitPacking

func (s *Context) ScanBitPacking(r Range[uint32], w int, size int, data []byte) (output BitSet, err error)

ScanBitPacking scans the input using bit packing

func (*Context) ScanRLE

func (s *Context) ScanRLE(r Range[uint32], size int, data []byte) (output BitSet, err error)

ScanRLE scans the input using run-length encoding

DataUnit represents a type that can be used in filter operations

type DataUnit interface {
    // contains filtered or unexported methods
}

type Range

Range represents a range of values

type Range[R DataUnit] struct {
    Min, Max R
}

Generated by gomarkdoc