Appearance
cellpack::runtime::physical_cores
Module contract · All interfaces
At a glance
Physical cores among cpus (logical CPU ids), or among the calling thread’s affinity set when cpus is empty: SMT siblings count once.
A logical CPU is identified by its (physical_package_id, core_id) pair; where either file is missing or unreadable, the CPU id itself stands in, so the result never exceeds the number of logical CPUs and is at least 1.
Contract reference
See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.