74#ifdef ORRERY_ENABLE_SYCL
76namespace orrery::solvers {
107class SyclDirectSolver final :
public ForceSolver {
121 [[nodiscard]]
static std::unique_ptr<SyclDirectSolver>
141 void evaluate(core::Vec3Span<const core::Real> positions, std::span<const core::Real> masses,
142 core::Vec3Span<core::Real> accelerations) override;
144 [[nodiscard]] std::string_view
name() const noexcept
override {
return "sycl-direct"; }
157 [[nodiscard]] const backend::DeviceDescription&
device() const noexcept;
186 explicit SyclDirectSolver(std::unique_ptr<Impl> impl) noexcept;
188 std::unique_ptr<Impl> impl_;
The softening length of the Plummer kernel above.
Definition softening.hpp:49
Direct summation evaluated on a SYCL device.
Definition sycl_direct_solver.hpp:107
void reset_interaction_count() noexcept override
Set every counter back to zero.
bool uses_shared_memory() const noexcept
Whether the arrays the kernel reads are shared unified memory, asked of the runtime rather than assum...
InteractionCount interaction_count() const noexcept override
The work done since construction or since the last reset.
core::Index tile_size() const noexcept
How many sources are staged through local memory at a time, which is also the work-group size.
const backend::DeviceDescription & device() const noexcept
What the runtime says about the device this solver runs on.
std::string_view name() const noexcept override
The solver's name, for benchmark tables and test messages.
Definition sycl_direct_solver.hpp:144
static std::unique_ptr< SyclDirectSolver > try_create(core::Softening softening={})
A solver on this machine's GPU, or nothing.
const SyclEvaluationTimings & timings() const noexcept
Where the last evaluation spent its time.
core::Softening softening() const noexcept override
The softening this solver applies.
void evaluate(core::Vec3Span< const core::Real > positions, std::span< const core::Real > masses, core::Vec3Span< core::Real > accelerations) override
Write the acceleration at each position into accelerations.
What every gravitational force solver in this project provides.
The unit in which the cost of a force evaluation is reported.
Plummer softening, defined once for everything that needs it.
What a solver has done since the count was last reset.
Definition interaction_count.hpp:37
Where the last evaluation spent its time.
Definition sycl_direct_solver.hpp:88
backend::Duration staging_in
Copying positions and masses into the shared allocations, and zeroing the padded tail.
Definition sycl_direct_solver.hpp:91
backend::Duration staging_out
Copying the accelerations back out.
Definition sycl_direct_solver.hpp:98
backend::Duration kernel
Submitting the kernel and waiting for the device.
Definition sycl_direct_solver.hpp:95
Finding the GPU, and reporting what was found.
The scalar and index types that every layer of the project agrees on.
Three parallel component arrays, viewed as one sequence of 3-vectors.
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