func NewManager(numaNodeInfo cputopology.NUMANodeInfo, topologyPolicyName string) (Manager, error) {
	klog.Infof("[topologymanager] Creating topology manager with %s policy", topologyPolicyName)

	var numaNodes []int
	for node := range numaNodeInfo {
		numaNodes = append(numaNodes, node)
	}

	if topologyPolicyName != PolicyNone && len(numaNodes) > maxAllowableNUMANodes {
		return nil, fmt.Errorf("unsupported on machines with more than %v NUMA Nodes", maxAllowableNUMANodes)
	}

	var policy Policy
	switch topologyPolicyName {

	case PolicyNone:
		policy = NewNonePolicy()

	case PolicyBestEffort:
		policy = NewBestEffortPolicy(numaNodes)

	case PolicyRestricted:
		policy = NewRestrictedPolicy(numaNodes)

	case PolicySingleNumaNode:
		policy = NewSingleNumaNodePolicy(numaNodes)

	default:
		return nil, fmt.Errorf("unknown policy: \"%s\"", topologyPolicyName)
	}

	var hp []HintProvider
	pth := make(map[string]map[string]TopologyHint)
	pm := make(map[string]string)
	manager := &manager{
		hintProviders:    hp,
		podTopologyHints: pth,
		podMap:           pm,
		policy:           policy,
	}

	return manager, nil
}
//NewManager creates a new TopologyManager based on provided policy
NewManager creates a new TopologyManager based on provided policy
// NewManager creates a new TopologyManager based on provided policy
func NewManager(numaNodeInfo cputopology.NUMANodeInfo, topologyPolicyName string) (Manager, error) {
	klog.Infof("[topologymanager] Creating topology manager with %s policy", topologyPolicyName)
	var numaNodes []int
	for node := range numaNodeInfo {
		numaNodes = append(numaNodes, node)
	}
	if topologyPolicyName != PolicyNone && len(numaNodes) > maxAllowableNUMANodes {
		return nil, fmt.Errorf("unsupported on machines with more than %v NUMA Nodes", maxAllowableNUMANodes)
	}
	var policy Policy
	switch topologyPolicyName {
	case PolicyNone:
		policy = NewNonePolicy()
	case PolicyBestEffort:
		policy = NewBestEffortPolicy(numaNodes)
	case PolicyRestricted:
		policy = NewRestrictedPolicy(numaNodes)
	case PolicySingleNumaNode:
		policy = NewSingleNumaNodePolicy(numaNodes)
	default:
		return nil, fmt.Errorf("unknown policy: \"%s\"", topologyPolicyName)
	}
	var hp []HintProvider
	pth := make(map[string]map[string]TopologyHint)
	pm := make(map[string]string)
	manager := &manager{
		hintProviders:    hp,
		podTopologyHints: pth,
		podMap:           pm,
		policy:           policy,
	}
	return manager, nil
}
func NewManager ( numaNodeInfo cputopology . NUMANodeInfo , topologyPolicyName string ) ( Manager , error ) { klog . Infof ( " " , topologyPolicyName ) var numaNodes [ ] int for node := range numaNodeInfo { numaNodes = append ( numaNodes , node ) } if topologyPolicyName != PolicyNone && len ( numaNodes ) > maxAllowableNUMANodes { return nil , fmt . Errorf ( " " , maxAllowableNUMANodes ) } var policy Policy switch topologyPolicyName { case PolicyNone : policy = NewNonePolicy ( ) case PolicyBestEffort : policy = NewBestEffortPolicy ( numaNodes ) case PolicyRestricted : policy = NewRestrictedPolicy ( numaNodes ) case PolicySingleNumaNode : policy = NewSingleNumaNodePolicy ( numaNodes ) default : return nil , fmt . Errorf ( " \" \" " , topologyPolicyName ) } var hp [ ] HintProvider pth := make ( map [ string ] map [ string ] TopologyHint ) pm := make ( map [ string ] string ) manager := & manager { hintProviders : hp , podTopologyHints : pth , podMap : pm , policy : policy , } return manager , nil }
NewManager creates a new TopologyManager based on provided policy
NewManager creates a new TopologyManager based on provided policy