hwlocality...ma_bitmask(3)

πŸ’… hwlocality_linux_libnuma_bitmask β€” the manual page, but make it make sense

okay so real talk, this is a page from the Library Functions Manual for hwlocality_linux_libnuma_bitmask β€” that long dramatic name literally just means "Interoperability with Linux libnuma bitmask". Bestie. It's the bridge page. It's giving translator at the UN. πŸŒ‰βœ¨


πŸŽ€ NAME πŸŽ€

hwlocality_linux_libnuma_bitmask β€” interoperability with Linux libnuma bitmask, periodt.


✨ SYNOPSIS ✨

🌸 Functions

struct bitmask * hwloc_cpuset_to_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_const_cpuset_t cpuset)
struct bitmask * hwloc_nodeset_to_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_const_nodeset_t nodeset)
int hwloc_cpuset_from_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_cpuset_t cpuset, const struct bitmask *bitmask)
int hwloc_nodeset_from_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_nodeset_t nodeset, const struct bitmask *bitmask)

πŸ¦‹ Detailed Description πŸ¦‹

This interface helps converting between Linux libnuma bitmasks and hwloc cpusets and nodesets. That's it, that's the whole job, and it does it iconically. πŸ’…

⚠️ Note β€” Topology topology must match the current machine. No cap, no exceptions, it's gotta be the real one you're running on.
⚠️ Note β€” The behavior of libnuma is undefined if the kernel is not NUMA-aware (that's when CONFIG_NUMA is not set in the kernel configuration). So this helper and libnuma may thus not be strictly compatible in this case β€” which may be detected by checking whether numa_available() returns -1. Basically: vibe check the kernel first, bestie, or you're in undefined-behavior territory and that's a 🚩. πŸ’€

πŸ”₯ Function Documentation πŸ”₯

🌈 int hwloc_cpuset_from_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_cpuset_t cpuset, const struct bitmask * bitmask) [inline]

Convert libnuma bitmask bitmask into hwloc CPU set cpuset. This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. So like, they hand you the bitmask, you translate it back into hwloc land. Teamwork. 🫢

Returns

  • 0 on success. slay.
  • -1 with errno set to ENOMEM if some internal reallocation failed. 😭 (it's the memory, not you)

⭐ struct bitmask * hwloc_cpuset_to_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_const_cpuset_t cpuset) [inline]

Convert hwloc CPU set cpuset into the returned libnuma bitmask. The returned bitmask should later be freed with numa_bitmask_free. πŸ—‘οΈ Don't just leave it there, that's not the move.

This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.

Returns

Newly allocated struct bitmask, or NULL on error.

πŸ’‘ Note β€” On heterogeneous memory platforms, we may return multiple local NUMA nodes even if libnuma reports only one (usually the first one). Yeah, it's extra. It's just built different. πŸ‘‘

πŸŽ€ int hwloc_nodeset_from_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_nodeset_t nodeset, const struct bitmask * bitmask) [inline]

Convert libnuma bitmask bitmask into hwloc NUMA node set nodeset. This function may be used after calling many numa_ functions that use a struct bitmask as an output parameter. Same energy as the cpuset one, just nodes now. 🧚

Returns

  • 0 on success. ate. ✨
  • -1 with errno set to ENOMEM if some internal reallocation failed.

πŸ’œ struct bitmask * hwloc_nodeset_to_linux_libnuma_bitmask (hwloc_topology_t topology, hwloc_const_nodeset_t nodeset) [inline]

Convert hwloc NUMA node set nodeset into the returned libnuma bitmask. The returned bitmask should later be freed with numa_bitmask_free. Yes we're saying it again, because apparently someone always forgets. πŸ”

This function may be used before calling many numa_ functions that use a struct bitmask as an input parameter.

Returns

Newly allocated struct bitmask, or NULL on error. 🫠


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code. Not a human, not a girlie, just a robot doing its little thing. πŸ€–πŸ’–


🌟 aaaand that's the page!! this one's from Hardware Locality (hwloc), Version 2.15.0, and the header said hwlocality...ma_bitmask(3) β€” mwah, go convert some bitmasks bestie, ily, bye!! πŸŽ€πŸ¦‹πŸ’…πŸŒˆβ­

✧ο½₯゚: * see you in the next manpage * :ο½₯゚✧

πŸ“¦ where this page comes from