34namespace orrery::backend {
37class SerialExecutor final :
public Executor {
39 SerialExecutor() =
default;
43 [[nodiscard]] std::string_view
name() const noexcept
override {
return "serial"; }
45 [[nodiscard]]
unsigned worker_count() const noexcept
override {
return 1; }
60 std::uint64_t regions_{};
ExecutorStatistics statistics() const override
The record of what the workers have done since the last reset.
CoreClass worker_core_class(unsigned) const noexcept override
Always unknown.
Definition serial_executor.hpp:49
std::string_view name() const noexcept override
The scheme's name, for benchmark tables and reports.
Definition serial_executor.hpp:43
void run(core::Index count, RangeTask task) override
Call task over pieces that together cover [0, count) exactly once each, and return when all of them h...
void reset_statistics() noexcept override
Set every counter back to zero.
unsigned worker_count() const noexcept override
How many workers this executor divides work between.
Definition serial_executor.hpp:45
Which logical processors this machine has, and which of them are fast.
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
How a kernel asks for a loop to be run in parallel.
core::FunctionRef< void(core::Index, core::Index)> RangeTask
A piece of a parallel loop: the half-open index range [begin, end).
Definition executor.hpp:49
The whole pool's record.
Definition worker_statistics.hpp:99
One worker's record, accumulated over every region since the last reset.
Definition worker_statistics.hpp:56
The scalar and index types that every layer of the project agrees on.
std::size_t Index
The type of a particle index and of any count of particles.
Definition types.hpp:45
What each worker thread did, and how long it spent doing nothing.
std::chrono::nanoseconds Duration
Durations are stored in nanoseconds so that they add without conversion and mean the same thing on ev...
Definition worker_statistics.hpp:53