Convert a CPU set into a NUMA node set and handle non-NUMA cases.
If some NUMA nodes have no CPUs at all, this function never sets their indexes in the output node set, even if a full CPU set is given in input.
If the topology contains no NUMA nodes, the machine is considered as a single memory node, and the following behavior is used: If cpuset
is empty, nodeset
will be emptied as well. Otherwise nodeset
will be entirely filled.