engine.hh
Go to the documentation of this file.
Space * steal(unsigned long int &d, Tracer &myt, Tracer &ot)
Hand over some work (nullptr if no work available).
Definition engine.hpp:492
Support::Event _e_terminate
Event for termination (all threads have terminated).
Definition engine.hh:198
std::atomic< unsigned long long int > n_runs
Number of calls to next() that have started search.
Definition engine.hh:246
bool scheduler_grow(void)
Grant leases up to the current request (scheduler_mutex held).
Definition engine.hpp:157
Support::Event e_search
Event for search (solution found, no more solutions, search stopped).
Definition engine.hh:238
virtual Space * next(void)
Return next solution (nullptr, if none exists or search has been stopped).
Definition engine.hpp:523
SchedulerWorker * scheduler_worker
Per-worker adjustable parallel admission state.
Definition engine.hh:125
std::atomic< unsigned long long int > scheduler_generation
Last request generation reconciled by the scheduler.
Definition engine.hh:133
unsigned int scheduler_select(SchedulerLogical logical, unsigned int exclude) const
Select a no-lease worker by logical state (scheduler_mutex held).
Definition engine.hpp:143
void scheduler_enable(bool root_owner)
Enable adjustable parallel admission.
Definition engine.hpp:183
void scheduler_owner(unsigned int worker)
Record that worker worker owns search.
Definition engine.hpp:285
volatile unsigned int _n_reset_not_ack
Number of workers that have not yet acknowledged reset.
Definition engine.hh:216
bool scheduler_admit(unsigned int worker)
Admit worker worker for one exploration action.
Definition engine.hpp:230
bool signal(void) const
Whether search state changed such that signal is needed.
Definition engine.hpp:352
volatile unsigned int _n_term_not_ack
Number of workers that have not yet acknowledged termination.
Definition engine.hh:190
volatile unsigned int _n_not_terminated
Number of not yet terminated workers.
Definition engine.hh:196
void scheduler_handoff(unsigned int worker, bool work_remains)
Hand worker worker's lease to a parked logical worker.
Definition engine.hpp:305
void stop(unsigned long long int r)
Report that a worker was stopped during call r of next().
Definition engine.hpp:384
void scheduler_reset(bool root_owner)
Reset adjustable parallel state while all workers are blocked.
Definition engine.hpp:207
bool scheduler_paused(void) const
Whether the external worker request currently pauses the engine.
Definition engine.hpp:278
const std::atomic< bool > * scheduler_fast_admit
Unchanged-capacity admission fast path.
Definition engine.hh:115
Depth-first path (stack of edges) supporting recomputation.
Definition path.hh:64
Queue with arbitrary number of elements.
Definition dynamic-queue.hpp:42
An interface for objects that can be run by a thread.
Definition thread.hpp:181
An interface for objects that can be called after a thread has terminated (after running the thread's...
Definition thread.hpp:168
Definition astar.cpp:43
Search engines
Gecode toplevel namespace
Per-worker adjustable parallel admission state.
Definition engine.hh:105
SchedulerLogical logical
Definition engine.hh:110
