Orrery
A GPU-accelerated N-body gravitational simulator
Toggle main menu visibility
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
33
namespace
orrery::backend {
34
47
enum class
CoreClass
: std::uint8_t {
49
kUnknown
,
51
kEfficiency
,
53
kPerformance
,
54
};
55
57
struct
LogicalProcessor
{
59
unsigned
id
{};
60
61
CoreClass
core_class{
CoreClass::kUnknown
};
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
orrery::backend::pin_current_thread
bool pin_current_thread(unsigned processor) noexcept
Confine the calling thread to one logical processor.
orrery::backend::query_logical_processors
std::vector< LogicalProcessor > query_logical_processors()
Every logical processor available to this process, in platform order.
orrery::backend::to_string
std::string_view to_string(CoreClass core_class) noexcept
A short name for a core class, for benchmark tables and reports.
orrery::backend::CoreClass
CoreClass
What kind of core a logical processor belongs to.
Definition
cpu_topology.hpp:47
orrery::backend::CoreClass::kUnknown
@ kUnknown
The platform does not distinguish, or the machine is homogeneous.
Definition
cpu_topology.hpp:49
orrery::backend::CoreClass::kPerformance
@ kPerformance
The faster, larger core. Lion Cove on the target machine.
Definition
cpu_topology.hpp:53
orrery::backend::CoreClass::kEfficiency
@ kEfficiency
The slower, smaller core. Skymont on the target machine.
Definition
cpu_topology.hpp:51
orrery::backend::LogicalProcessor
One logical processor, as the operating system numbers them.
Definition
cpu_topology.hpp:57
orrery
backend
cpu_topology.hpp
Generated by
1.17.0