Generated on for Gecode by doxygen 1.17.0
Gecode::Search::WorkerControlAccess Class Reference

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()

void Gecode::Search::WorkerControlAccess::attach ( WorkerControl & control,
unsigned int capacity )
static

Attach control to a leaf engine with fixed capacity.

Definition at line 135 of file worker-control.cpp.

◆ detach()

void Gecode::Search::WorkerControlAccess::detach ( WorkerControl & control)
static

Detach control from its leaf engine.

Definition at line 163 of file worker-control.cpp.

◆ prepare_reuse()

void Gecode::Search::WorkerControlAccess::prepare_reuse ( WorkerControl & control)
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()

unsigned long long int Gecode::Search::WorkerControlAccess::generation ( const WorkerControl & control)
static

Return the request generation.

Definition at line 187 of file worker-control.cpp.

◆ fast_admission() [1/2]

const std::atomic< bool > * Gecode::Search::WorkerControlAccess::fast_admission ( const WorkerControl & control)
static

Return the unchanged-capacity fast-admission flag.

Definition at line 193 of file worker-control.cpp.

◆ fast_admission() [2/2]

void Gecode::Search::WorkerControlAccess::fast_admission ( WorkerControl & control,
unsigned long long int generation )
static

Publish fast admission after reconciling generation at capacity.

Definition at line 199 of file worker-control.cpp.

◆ same_identity()

bool Gecode::Search::WorkerControlAccess::same_identity ( const WorkerControl & x,
const WorkerControl & y )
static

Return whether x and y share one control identity.

Definition at line 212 of file worker-control.cpp.

◆ requested()

unsigned int Gecode::Search::WorkerControlAccess::requested ( const WorkerControl & control)
static

Return the current request.

Definition at line 218 of file worker-control.cpp.

◆ snapshot()

void Gecode::Search::WorkerControlAccess::snapshot ( const WorkerControl & control,
unsigned int & requested,
unsigned long long int & generation )
static

Return a consistent request and generation snapshot.

Definition at line 224 of file worker-control.cpp.

◆ wait()

void Gecode::Search::WorkerControlAccess::wait ( WorkerControl & control,
unsigned int worker )
static

Wait for the event belonging to worker worker.

Definition at line 239 of file worker-control.cpp.

◆ signal()

void Gecode::Search::WorkerControlAccess::signal ( WorkerControl & control,
unsigned int worker )
static

Signal the event belonging to worker worker.

Definition at line 257 of file worker-control.cpp.

◆ signal_all()

void Gecode::Search::WorkerControlAccess::signal_all ( WorkerControl & control)
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: