public static unsafe GroupAffinity *GetGroup(ProcessorRelationship *p, int index) { if (index < 0 || index >= p->GroupCount) { throw new IndexOutOfRangeException(); } return((GroupAffinity *)((byte *)p + 24) + index); }
private static unsafe void LoadCpuMaskFromGroupAffinities(ProcessorRelationship *p, ref BitMask cpuMask) { for (int i = 0; i < p->GroupCount; ++i) { GroupAffinity *g = ProcessorRelationship.GetGroup(p, i); int groupIndex = g->Group; if (Environment.Is64BitProcess) cpuMask.SetWord64(groupIndex, (ulong)g->Mask); }