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 whenCONFIG_NUMAis 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 whethernuma_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
0on success. slay.-1witherrnoset toENOMEMif 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
0on success. ate. β¨-1witherrnoset toENOMEMif 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
- 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