Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
cpu_topology.hpp
Go to the documentation of this file.
1#pragma once
2
28
29#include <cstdint>
30#include <string_view>
31#include <vector>
32
33namespace orrery::backend {
34
47enum class CoreClass : std::uint8_t {
54};
55
59 unsigned id{};
60
62};
63
70[[nodiscard]] std::vector<LogicalProcessor> query_logical_processors();
71
80[[nodiscard]] bool pin_current_thread(unsigned processor) noexcept;
81
83[[nodiscard]] std::string_view to_string(CoreClass core_class) noexcept;
84
85} // namespace orrery::backend
bool pin_current_thread(unsigned processor) noexcept
Confine the calling thread to one logical processor.
std::vector< LogicalProcessor > query_logical_processors()
Every logical processor available to this process, in platform order.
std::string_view to_string(CoreClass core_class) noexcept
A short name for a core class, for benchmark tables and reports.
CoreClass
What kind of core a logical processor belongs to.
Definition cpu_topology.hpp:47
@ kUnknown
The platform does not distinguish, or the machine is homogeneous.
Definition cpu_topology.hpp:49
@ kPerformance
The faster, larger core. Lion Cove on the target machine.
Definition cpu_topology.hpp:53
@ kEfficiency
The slower, smaller core. Skymont on the target machine.
Definition cpu_topology.hpp:51
One logical processor, as the operating system numbers them.
Definition cpu_topology.hpp:57