/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/physics/integration/map_completion.hh Source File#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
map_completion.hh
Go to the documentation of this file.
26 inline constexpr bool has_device_backend = !std::is_same_v<typename GPU_exec::memory_space, CPU_memory>;
96 static void record_work(std::function<void()> job) { deferred_work().push_back(std::move(job)); }
Scope in which map() results are landed lazily instead of one blocking copy per call.
Definition map_completion.hh:219
DeferredMaps & operator=(const DeferredMaps &)=delete
DeferredMaps(const DeferredMaps &)=delete
Deferred landing of QuadratureIntegrator::map() results in host memory.
Definition map_completion.hh:62
static void set_deferral(const bool enabled)
Definition map_completion.hh:160
static bool deferral_enabled()
Whether the caller has opened a DeferredMaps scope.
Definition map_completion.hh:159
static std::vector< std::function< void()> > & deferred_work()
Definition map_completion.hh:175
static std::vector< PendingCopy > & pending()
Definition map_completion.hh:170
static void record(void *dst, const void *src, const size_t bytes)
Register a device->host result that still has to be copied from staging into dst.
Definition map_completion.hh:73
static bool has_pending(const void *src)
Whether src already has an unlanded result queued.
Definition map_completion.hh:149
static void discard(const char *reason)
Drop every pending copy without performing it, and abandon the MPI plan.
Definition map_completion.hh:134
static void flush()
Fence, land every pending map result, then exchange slices between MPI ranks.
Definition map_completion.hh:108
static void record_work(std::function< void()> job)
Queue a host-side map() to be run at flush time instead of now.
Definition map_completion.hh:96
void set_batched(const bool batched)
Tell the scheduler whether the caller has a deferral scope open.
Definition map_scheduler.hh:272
static MapScheduler & instance()
void poison(const char *reason)
void complete()
Exchange every slice registered since the last completion.
constexpr bool has_device_backend
Whether the default execution space is a real device.
Definition map_completion.hh:26
Definition complex_math.hh:10
void flush_maps()
Land all outstanding map() results. See MapCompletion.
Definition map_completion.hh:190
Definition map_completion.hh:64
Generated by