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 πŸ“

  • 0 on success.
  • -1 with errno set to ENOMEM on 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 πŸ“

  • 0 on success.
  • -1 with errno set to ENOMEM on 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