- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for bitMask (0.13 sec)
-
pkg/kubelet/cm/topologymanager/bitmask/bitmask.go
IsNarrowerThan(mask BitMask) bool IsLessThan(mask BitMask) bool IsGreaterThan(mask BitMask) bool String() string Count() int GetBits() []int } type bitMask uint64 // NewEmptyBitMask creates a new, empty BitMask func NewEmptyBitMask() BitMask { s := bitMask(0) return &s } // NewBitMask creates a new BitMask func NewBitMask(bits ...int) (BitMask, error) { s := bitMask(0) err := (&s).Add(bits...)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 09:45:09 UTC 2022 - 5.1K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/numa_info.go
NUMADistances: distances, } return numaInfo, nil } func (n *NUMAInfo) Narrowest(m1 bitmask.BitMask, m2 bitmask.BitMask) bitmask.BitMask { if m1.IsNarrowerThan(m2) { return m1 } return m2 } func (n *NUMAInfo) Closest(m1 bitmask.BitMask, m2 bitmask.BitMask) bitmask.BitMask { // If the length of both bitmasks aren't the same, choose the one that is narrowest. if m1.Count() != m2.Count() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 09 16:52:14 UTC 2022 - 2.7K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/numa_info_test.go
t.Errorf("Expected result to equal %g, not %g", tcase.expectedAvg, result) } } } func TestClosest(t *testing.T) { tcases := []struct { description string current bitmask.BitMask candidate bitmask.BitMask expected string numaInfo *NUMAInfo }{ { description: "current and candidate length is not the same, current narrower", current: NewTestBitMask(0),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 09 16:52:14 UTC 2022 - 11.6K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/bitmask/bitmask_test.go
masks: [][]int{{0, 1, 2, 3}, {1, 2, 3}, {2, 3}, {3}}, andMask: "1000", }, } for _, tc := range tcases { var bitMasks []BitMask for i := range tc.masks { bitMask, _ := NewBitMask(tc.masks[i]...) bitMasks = append(bitMasks, bitMask) } resultMask := And(bitMasks[0], bitMasks...) if resultMask.String() != string(tc.andMask) { t.Errorf("Expected mask to be %v, got %v", tc.andMask, resultMask) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 09:45:09 UTC 2022 - 16.2K bytes - Viewed (0) -
pkg/kubelet/cm/cpumanager/policy_static_test.go
topo: topoDualSocketHT, stAssignments: state.ContainerCPUAssignments{}, stDefaultCPUSet: cpuset.New(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), numRequested: 2, socketMask: func() bitmask.BitMask { mask, _ := bitmask.NewBitMask(1) return mask }(), expCSet: cpuset.New(1, 7), }, { description: "Request 8 CPUs, BitMask on Socket 0",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 40.8K bytes - Viewed (0) -
src/sync/atomic/type.go
// And atomically performs a bitwise AND operation on x using the bitmask // provided as mask and returns the old value. func (x *Int32) And(mask int32) (old int32) { return AndInt32(&x.v, mask) } // Or atomically performs a bitwise OR operation on x using the bitmask // provided as mask and returns the old value. func (x *Int32) Or(mask int32) (old int32) { return OrInt32(&x.v, mask) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:37:29 UTC 2024 - 8.5K bytes - Viewed (0) -
src/sync/atomic/doc.go
// AndInt32 atomically performs a bitwise AND operation on *addr using the bitmask provided as mask // and returns the old value. // Consider using the more ergonomic and less error-prone [Int32.And] instead. func AndInt32(addr *int32, mask int32) (old int32) // AndUint32 atomically performs a bitwise AND operation on *addr using the bitmask provided as mask // and returns the old value.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 11.7K bytes - Viewed (0) -
pkg/kubelet/cm/cpumanager/topology_hints_test.go
cpuSetAcrossSocket, _ := cpuset.Parse("0-28,40-57") m0001, _ := bitmask.NewBitMask(0) m0011, _ := bitmask.NewBitMask(0, 1) m0101, _ := bitmask.NewBitMask(0, 2) m1001, _ := bitmask.NewBitMask(0, 3) m0111, _ := bitmask.NewBitMask(0, 1, 2) m1011, _ := bitmask.NewBitMask(0, 1, 3) m1101, _ := bitmask.NewBitMask(0, 2, 3) m1111, _ := bitmask.NewBitMask(0, 1, 2, 3) testCases := []struct { description string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 19K bytes - Viewed (0) -
pkg/kubelet/cm/topologymanager/policy.go
// are preferred. func mergePermutation(defaultAffinity bitmask.BitMask, permutation []TopologyHint) TopologyHint { // Get the NUMANodeAffinity from each hint in the permutation and see if any // of them encode unpreferred allocations. preferred := true var numaAffinities []bitmask.BitMask for _, hint := range permutation { // Only consider hints that have an actual NUMANodeAffinity set.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 03 09:45:25 UTC 2022 - 12.7K bytes - Viewed (0) -
pkg/kubelet/cm/memorymanager/policy_static.go
} } return false } func isNUMAAffinitiesEqual(numaAffinity1, numaAffinity2 []int) bool { bitMask1, err := bitmask.NewBitMask(numaAffinity1...) if err != nil { klog.ErrorS(err, "failed to create bit mask", "numaAffinity1", numaAffinity1) return false } bitMask2, err := bitmask.NewBitMask(numaAffinity2...) if err != nil { klog.ErrorS(err, "failed to create bit mask", "numaAffinity2", numaAffinity2)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Nov 12 07:34:55 UTC 2023 - 34K bytes - Viewed (0)