Generated on for Gecode by doxygen 1.18.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.

◆ detach()

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

Detach control from its leaf engine.

◆ 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.

◆ generation()

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

Return the request generation.

◆ fast_admission() [1/2]

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

Return the unchanged-capacity fast-admission flag.

◆ 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.

◆ same_identity()

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

Return whether x and y share one control identity.

◆ requested()

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

Return the current request.

◆ 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.

◆ wait()

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

Wait for the event belonging to worker worker.

◆ signal()

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

Signal the event belonging to worker worker.

◆ signal_all()

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

Signal every worker event.


The documentation for this class was generated from the following file: