public void AssertCoreTopo(CpuTopoType topoType, int id, int mask) { foreach (CpuTopo cpuTopo in Cpu.Topology.CoreTopology) { if (cpuTopo.TopoType == topoType && cpuTopo.Id == id) { Assert.That(cpuTopo.Mask, Is.EqualTo(mask), "CPU Topo '{0}' of id {1} mask mismatch", topoType.ToString(), id); return; } } Assert.Fail("CPU Topo '{0}' of id {1} not found", topoType.ToString(), id); }
/// <summary> /// Initializes a new instance of the <see cref="CpuTopo"/> class. /// </summary> /// <param name="id">The identifier for this core, derived from the APIC Id.</param> /// <param name="topoType">The topology type for this entry.</param> /// <param name="mask">The APIC mask which defines this processor level.</param> public CpuTopo(long id, CpuTopoType topoType, long mask) { Id = id; TopoType = topoType; Mask = mask; }