worker-control.cpp
Go to the documentation of this file.
Exception: Invalid requested number of search workers
Definition exception.hpp:66
Exception: Request through an empty worker control
Definition exception.hpp:72
static void signal(WorkerControl &control, unsigned int worker)
Signal the event belonging to worker worker.
Definition worker-control.cpp:257
static void signal_all(WorkerControl &control)
Signal every worker event.
Definition worker-control.cpp:275
static bool same_identity(const WorkerControl &x, const WorkerControl &y)
Return whether x and y share one control identity.
Definition worker-control.cpp:212
static unsigned long long int generation(const WorkerControl &control)
Return the request generation.
Definition worker-control.cpp:187
static void prepare_reuse(WorkerControl &control)
Prepare control for another engine with the same capacity.
Definition worker-control.cpp:176
static void snapshot(const WorkerControl &control, unsigned int &requested, unsigned long long int &generation)
Return a consistent request and generation snapshot.
Definition worker-control.cpp:224
static void wait(WorkerControl &control, unsigned int worker)
Wait for the event belonging to worker worker.
Definition worker-control.cpp:239
static void detach(WorkerControl &control)
Detach control from its leaf engine.
Definition worker-control.cpp:163
static const std::atomic< bool > * fast_admission(const WorkerControl &control)
Return the unchanged-capacity fast-admission flag.
Definition worker-control.cpp:193
static void attach(WorkerControl &control, unsigned int capacity)
Attach control to a leaf engine with fixed capacity.
Definition worker-control.cpp:135
static unsigned int requested(const WorkerControl &control)
Return the current request.
Definition worker-control.cpp:218
Exception: Worker control is already bound or used in an unsupported engine
Definition exception.hpp:78
std::atomic< unsigned long long int > generation
Definition worker-control.cpp:48
std::atomic< unsigned int > requested
Definition worker-control.cpp:46
State(unsigned int workers)
Definition worker-control.cpp:54
std::atomic< unsigned int > capacity
Definition worker-control.cpp:47
@ READY_TO_BIND
Definition worker-control.cpp:41
std::atomic< bool > fast_admit
Definition worker-control.cpp:49
External control for the requested number of search workers.
Definition search.hh:773
WorkerControl & operator=(const WorkerControl &control)
Assignment operator.
Definition worker-control.cpp:75
unsigned int requested(void) const noexcept
Return the requested number of workers (zero also denotes an empty handle).
Definition worker-control.cpp:95
void request(unsigned int workers)
Request workers workers (zero pauses the engine).
Definition worker-control.cpp:101
unsigned int capacity(void) const noexcept
Return the fixed worker capacity, or zero before attachment.
Definition worker-control.cpp:129
Search engines
Gecode toplevel namespace
