Internal access to worker-control state. More...
#include <gecode/search/worker-control.hh>
Static Public Member Functions | |
| static void | attach (WorkerControl &control, unsigned int capacity) |
| Attach control to a leaf engine with fixed capacity. | |
| static void | detach (WorkerControl &control) |
| Detach control from its leaf engine. | |
| static void | prepare_reuse (WorkerControl &control) |
| Prepare control for another engine with the same capacity. | |
| static unsigned long long int | generation (const WorkerControl &control) |
| Return the request generation. | |
| static const std::atomic< bool > * | fast_admission (const WorkerControl &control) |
| Return the unchanged-capacity fast-admission flag. | |
| static void | fast_admission (WorkerControl &control, unsigned long long int generation) |
| Publish fast admission after reconciling generation at capacity. | |
| static bool | same_identity (const WorkerControl &x, const WorkerControl &y) |
| Return whether x and y share one control identity. | |
| static unsigned int | requested (const WorkerControl &control) |
| Return the current request. | |
| static void | snapshot (const WorkerControl &control, unsigned int &requested, unsigned long long int &generation) |
| Return a consistent request and generation snapshot. | |
| static void | wait (WorkerControl &control, unsigned int worker) |
| Wait for the event belonging to worker worker. | |
| static void | signal (WorkerControl &control, unsigned int worker) |
| Signal the event belonging to worker worker. | |
| static void | signal_all (WorkerControl &control) |
| Signal every worker event. | |
Detailed Description
Internal access to worker-control state.
Definition at line 39 of file worker-control.hh.
Member Function Documentation
◆ attach()
|
static |
Attach control to a leaf engine with fixed capacity.
Definition at line 135 of file worker-control.cpp.
◆ detach()
|
static |
Detach control from its leaf engine.
Definition at line 163 of file worker-control.cpp.
◆ prepare_reuse()
|
static |
Prepare control for another engine with the same capacity.
The owner must have destroyed the previous engine and joined its workers. Requests and event storage survive the transition. Preparing an attached control raises WorkerControlInUse; otherwise this operation is idempotent. Attaching the prepared control with a different capacity raises InvalidWorkerRequest. This is an internal engine-owner operation.
Definition at line 176 of file worker-control.cpp.
◆ generation()
|
static |
Return the request generation.
Definition at line 187 of file worker-control.cpp.
◆ fast_admission() [1/2]
|
static |
Return the unchanged-capacity fast-admission flag.
Definition at line 193 of file worker-control.cpp.
◆ fast_admission() [2/2]
|
static |
Publish fast admission after reconciling generation at capacity.
Definition at line 199 of file worker-control.cpp.
◆ same_identity()
|
static |
Return whether x and y share one control identity.
Definition at line 212 of file worker-control.cpp.
◆ requested()
|
static |
Return the current request.
Definition at line 218 of file worker-control.cpp.
◆ snapshot()
|
static |
Return a consistent request and generation snapshot.
Definition at line 224 of file worker-control.cpp.
◆ wait()
|
static |
Wait for the event belonging to worker worker.
Definition at line 239 of file worker-control.cpp.
◆ signal()
|
static |
Signal the event belonging to worker worker.
Definition at line 257 of file worker-control.cpp.
◆ signal_all()
|
static |
Signal every worker event.
Definition at line 275 of file worker-control.cpp.
The documentation for this class was generated from the following files:
- gecode/search/worker-control.hh
- gecode/search/worker-control.cpp
