scalable

package
v0.0.0-...-e16fa26 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract[Element any](b Bunch[Element]) (result []Element)

Types

type Bunch

type Bunch[Element any] interface {
	Load(source Reader[Element])
	Store(dest Writer[Element])
	Active() Predicate

	Mul(x, y Bunch[Element]) Bunch[Element]
}

func NewBunch

func NewBunch[T any]() (b Bunch[T])

type Predicate

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

Predicate records which elements of a vector are active and hold usable values. To support Arm SVE, this requires re-striding when changing vector element widths. See README-DESIGN.md.

func (Predicate) Count

func (p Predicate) Count() int

func (Predicate) ForActive

func (p Predicate) ForActive(f func(index int))

func (Predicate) Set

func (p Predicate) Set(i int, b bool) (result Predicate)

type Reader

type Reader[Element any] interface {
	Read() (value Element, ok bool)
}

func FromChan

func FromChan[Element any](c <-chan Element) Reader[Element]

func FromSlice

func FromSlice[Element any](s *[]Element) Reader[Element]

type Writer

type Writer[Element any] interface {
	Write(value Element)
}

func ToChan

func ToChan[Element any](c chan<- Element) Writer[Element]

func ToSlice

func ToSlice[Element any](s *[]Element) Writer[Element]

Jump to

Keyboard shortcuts

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