|
Orrery
A GPU-accelerated N-body gravitational simulator
|
Runs the whole range on the calling thread. More...
#include <orrery/backend/serial_executor.hpp>
Public Member Functions | |
| 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 have finished. | |
| std::string_view | name () const noexcept override |
| The scheme's name, for benchmark tables and reports. | |
| unsigned | worker_count () const noexcept override |
| How many workers this executor divides work between. | |
| CoreClass | worker_core_class (unsigned) const noexcept override |
| Always unknown. | |
| ExecutorStatistics | statistics () const override |
| The record of what the workers have done since the last reset. | |
| void | reset_statistics () noexcept override |
| Set every counter back to zero. | |
Additional Inherited Members | |
| Protected Member Functions inherited from orrery::backend::Executor | |
| Executor (const Executor &)=default | |
| Executor (Executor &&)=default | |
| Executor & | operator= (const Executor &)=default |
| Executor & | operator= (Executor &&)=default |
Runs the whole range on the calling thread.
|
overridevirtual |
Call task over pieces that together cover [0, count) exactly once each, and return when all of them have finished.
The division is the implementation's to choose, and so is the number of threads it uses and the order the pieces run in. A caller may rely on each index being covered exactly once and on all the work being complete on return, and on nothing else.
A count of zero runs nothing. An empty configuration is a configuration, and it reaches the solvers by the same path as any other.
Implements orrery::backend::Executor.
|
inlinenodiscardoverridevirtualnoexcept |
The scheme's name, for benchmark tables and reports.
Implements orrery::backend::Executor.
|
inlinenodiscardoverridevirtualnoexcept |
How many workers this executor divides work between.
Implements orrery::backend::Executor.
|
inlinenodiscardoverridevirtualnoexcept |
Always unknown.
The calling thread is not pinned, and pinning it would be a side effect on a thread this class does not own.
Implements orrery::backend::Executor.
|
nodiscardoverridevirtual |
The record of what the workers have done since the last reset.
Safe to call only when no region is running, which for a single submitting thread means any time run is not on the stack. It copies the per-worker records rather than returning a view of them, because a caller comparing two schemes needs the first scheme's numbers to survive the second scheme running.
Implements orrery::backend::Executor.
|
overridevirtualnoexcept |
Set every counter back to zero.
A benchmark measures the region it timed rather than the warm-up before it, and once the two have been added together they cannot be separated.
Implements orrery::backend::Executor.