Generated on for Gecode by doxygen 1.18.0
Gecode::Search::Par::DFS< Tracer >::Worker Class Reference

Parallel depth-first search worker More...

#include <gecode/search/par/dfs.hh>

Public Member Functions

 Worker (Space *s, DFS &e, unsigned int index)
 Initialize for space s with engine e.
DFS & engine (void) const
 Provide access to engine.
virtual void run (void)
 Start execution of worker.
bool find (void)
 Try to find some work.
void reset (Space *s, unsigned int ngdl)
 Reset worker to restart at space s.
bool owns_work (void) const
 Whether this worker currently owns local search.
Public Member Functions inherited from Gecode::Search::Par::Engine< Tracer >::Worker
 Worker (Space *s, Engine &e)
 Initialize for space s with engine e.
Space * steal (unsigned long int &d, Tracer &myt, Tracer &ot)
 Hand over some work (nullptr if no work available).
Statistics statistics (void)
 Return statistics.
Engine & engine (void) const
 Provide access to engine.
NoGoods & nogoods (void)
 Return no-goods.
virtual ~Worker (void)
 Destructor.
virtual Support::Terminator * terminator (void) const
 Terminator (engine).
Public Member Functions inherited from Gecode::Search::Worker
 Worker (void)
 Initialize.
void start (void)
 Reset stop information.
bool stop (const Options &o)
 Check whether engine must be stopped.
bool stop_seq (Options &o)
 Check stop and wait for admission of a sequential worker.
bool stopped (void) const
 Check whether engine has been stopped.
void reset (unsigned long int d=0)
 Reset statistics with root depth d.
void stack_depth (unsigned long int d)
 Record stack depth d.
unsigned long int steal_depth (unsigned long int d) const
 Return steal depth.
Public Member Functions inherited from Gecode::Search::Statistics
 Statistics (void)
 Initialize.
void reset (void)
 Reset.
Statistics operator+ (const Statistics &s)
 Return sum with s.
Statistics & operator+= (const Statistics &s)
 Increment by statistics s.
Public Member Functions inherited from Gecode::StatusStatistics
 StatusStatistics (void)
 Initialize.
void reset (void)
 Reset information.
StatusStatistics operator+ (const StatusStatistics &s)
 Return sum with s.
StatusStatistics & operator+= (const StatusStatistics &s)
 Increment by statistics s.
Public Member Functions inherited from Gecode::Support::Runnable
 Runnable (bool d=true)
 Initialize, d defines whether object is deleted when terminated.
void todelete (bool d)
 Set whether to delete upon termination.
bool todelete (void) const
 Return whether to be deleted upon termination.
virtual ~Runnable (void)
 Destructor.

Public Attributes

unsigned int index
 Fixed worker index.
Public Attributes inherited from Gecode::Search::Par::Engine< Tracer >::Worker
Tracer tracer
 Search tracer.
Public Attributes inherited from Gecode::Search::Statistics
unsigned long long int fail
 Number of failed nodes in search tree.
unsigned long long int node
 Number of nodes expanded.
unsigned long int depth
 Maximum depth of search stack.
unsigned long int restart
 Number of restarts.
unsigned long int nogood
 Number of no-goods posted.
Public Attributes inherited from Gecode::StatusStatistics
unsigned long long int propagate
 Number of propagator executions.

Additional Inherited Members

Static Public Member Functions inherited from Gecode::Support::Runnable
static void * operator new (size_t s)
 Allocate memory from heap.
static void operator delete (void *p)
 Free memory allocated from heap.
Protected Attributes inherited from Gecode::Search::Par::Engine< Tracer >::Worker
Engine & _engine
 Reference to engine.
Support::Mutex m
 Mutex for access to worker.
Path< Tracer > path
 Current path ins search tree.
Space * cur
 Current space being explored.
unsigned int d
 Distance until next clone.
bool idle
 Whether the worker is idle.
Protected Attributes inherited from Gecode::Search::Worker
bool _stopped
 Whether engine has been stopped.
unsigned long int root_depth
 Depth of root node (for work stealing).

Detailed Description

template<class Tracer>
class Gecode::Search::Par::DFS< Tracer >::Worker

Parallel depth-first search worker

Definition at line 66 of file dfs.hh.

Constructor & Destructor Documentation

◆ Worker()

template<class Tracer>
Gecode::Search::Par::DFS< Tracer >::Worker::Worker ( Space * s,
DFS & e,
unsigned int index )
inline

Initialize for space s with engine e.

Definition at line 56 of file dfs.hpp.

Member Function Documentation

◆ engine()

template<class Tracer>
DFS< Tracer > & Gecode::Search::Par::DFS< Tracer >::Worker::engine ( void ) const
inline

Provide access to engine.

Definition at line 41 of file dfs.hpp.

◆ run()

template<class Tracer>
void Gecode::Search::Par::DFS< Tracer >::Worker::run ( void )
virtual

Start execution of worker.

Implements Gecode::Support::Runnable.

Definition at line 175 of file dfs.hpp.

◆ find()

template<class Tracer>
bool Gecode::Search::Par::DFS< Tracer >::Worker::find ( void )
inline

Try to find some work.

Definition at line 133 of file dfs.hpp.

◆ reset()

template<class Tracer>
void Gecode::Search::Par::DFS< Tracer >::Worker::reset ( Space * s,
unsigned int ngdl )
inline

Reset worker to restart at space s.

Definition at line 86 of file dfs.hpp.

◆ owns_work()

template<class Tracer>
bool Gecode::Search::Par::DFS< Tracer >::Worker::owns_work ( void ) const
inline

Whether this worker currently owns local search.

Definition at line 107 of file dfs.hpp.

Member Data Documentation

◆ index

template<class Tracer>
unsigned int Gecode::Search::Par::DFS< Tracer >::Worker::index

Fixed worker index.

Definition at line 80 of file dfs.hh.


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