HWLOC_CPUSET_FROM_NODESET(3)
π hwlocality...set_convert(3) π
okay bestie, this page is from the Library Functions Manual and it's all about converting between CPU sets and node sets β no cap, it's giving helper-function excellence β¨
π NAME π
hwlocality_helper_nodeset_convert β Converting between CPU sets and node sets π«
β¨ SYNOPSIS β¨
πΈ Functions πΈ
int hwloc_cpuset_to_nodeset (hwloc_topology_t topology,
hwloc_const_cpuset_t _cpuset, hwloc_nodeset_t nodeset)
int hwloc_cpuset_from_nodeset (hwloc_topology_t topology, hwloc_cpuset_t
_cpuset, hwloc_const_nodeset_t nodeset)
π¦ Detailed Description π¦
literally no extra prose here on this page β the actual conversion lore is right below in Function Documentation, bestie π
π₯ Function Documentation π₯
π hwloc_cpuset_from_nodeset π
int hwloc_cpuset_from_nodeset (hwloc_topology_t topology, hwloc_cpuset_t
_cpuset, hwloc_const_nodeset_t nodeset) [inline]
okay so this one is the NUMA node set β CPU set glow-up π Convert a NUMA node set into a CPU set. For each NUMA node included in the input nodeset, set the corresponding local PUs in the output _cpuset. Slay.
but listen: if some CPUs have no local NUMA nodes, this function never sets their indexes in the output CPU set, even if a full node set is given in input. that's important, don't skip it π
hence the entire topology node set is converted into the set of all CPUs that have some local NUMA nodes. periodt.
π Returns π
0on success.-1witherrnoset toENOMEMon internal reallocation failure.
π hwloc_cpuset_to_nodeset π
int hwloc_cpuset_to_nodeset (hwloc_topology_t topology,
hwloc_const_cpuset_t _cpuset, hwloc_nodeset_t nodeset) [inline]
now the reverse direction, main character energy: CPU set β NUMA node set π₯ Convert a CPU set into a NUMA node set. For each PU included in the input _cpuset, set the corresponding local NUMA node(s) in the output nodeset.
and yeah, 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. noted, bestie π
hence the entire topology CPU set is converted into the set of all nodes that have some local CPUs. iconic.
π Returns π
0on success.-1witherrnoset toENOMEMon internal reallocation failure.
π Author π
Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. π«
mwah π β that's Hardware Locality (hwloc), Version 2.15.0, page hwlocality...set_convert(3), from the Library Functions Manual. no cap, that's the footer tea and it's lowkey iconic π
π¦ where this page comes from
- arch rolling: hwloc 2.15.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms