kubernetes: k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask Index | Files

package bitmask

import "k8s.io/kubernetes/pkg/kubelet/cm/topologymanager/bitmask"


Package Files


func IterateBitMasks Uses

func IterateBitMasks(bits []int, callback func(BitMask))

IterateBitMasks iterates all possible masks from a list of bits, issuing a callback on each mask.

type BitMask Uses

type BitMask interface {
    Add(bits ...int) error
    Remove(bits ...int) error
    And(masks ...BitMask)
    Or(masks ...BitMask)
    IsEqual(mask BitMask) bool
    IsEmpty() bool
    IsSet(bit int) bool
    AnySet(bits []int) bool
    IsNarrowerThan(mask BitMask) bool
    String() string
    Count() int
    GetBits() []int

BitMask interface allows hint providers to create BitMasks for TopologyHints

func And Uses

func And(first BitMask, masks ...BitMask) BitMask

And is a package level implementation of 'and' between first and masks

func NewBitMask Uses

func NewBitMask(bits ...int) (BitMask, error)

NewBitMask creates a new BitMask

func NewEmptyBitMask Uses

func NewEmptyBitMask() BitMask

NewEmptyBitMask creates a new, empty BitMask

func Or Uses

func Or(first BitMask, masks ...BitMask) BitMask

Or is a package level implementation of 'or' between first and masks

Package bitmask imports 3 packages (graph) and is imported by 39 packages. Updated 2020-08-02. Refresh now. Tools for package owners.