Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for NewBitMask (0.18 sec)

  1. 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)
  2. pkg/kubelet/cm/cpumanager/policy_static_test.go

    			expErr:          nil,
    			expCPUAlloc:     true,
    			expCSet:         cpuset.New(1, 2, 3, 4, 5, 7, 8, 9, 10, 11),
    		},
    	}
    	newNUMAAffinity := func(bits ...int) bitmask.BitMask {
    		affinity, _ := bitmask.NewBitMask(bits...)
    		return affinity
    	}
    	alignBySocketOptionTestCases := []staticPolicyTest{
    		{
    			description: "Align by socket: true, cpu's within same socket of numa in hint are part of allocation",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  3. 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)
  4. pkg/kubelet/cm/devicemanager/topology_hints_test.go

    	return pluginapi.Device{
    		ID:       id,
    		Topology: &pluginapi.TopologyInfo{Nodes: []*pluginapi.NUMANode{{ID: int64(numa)}}},
    	}
    }
    
    func makeSocketMask(sockets ...int) bitmask.BitMask {
    	mask, _ := bitmask.NewBitMask(sockets...)
    	return mask
    }
    
    func TestGetTopologyHints(t *testing.T) {
    	tcases := getCommonTestCases()
    
    	for _, tc := range tcases {
    		m := ManagerImpl{
    			allDevices:       NewResourceDeviceInstances(),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 27 13:02:15 UTC 2023
    - 47.5K bytes
    - Viewed (0)
Back to top