Generated on Sat Feb 7 2015 02:01:50 for Gecode by doxygen 1.8.9.1
Gecode::Search::Parallel::Engine::Worker Class Reference

Parallel depth-first search worker More...

#include <engine.hh>

Public Member Functions

 Worker (Space *s, Engine &e)
 Initialize for space s with engine e. More...
 
Spacesteal (unsigned long int &d)
 Hand over some work (NULL if no work available) More...
 
Statistics statistics (void)
 Return statistics. More...
 
Engineengine (void) const
 Provide access to engine. More...
 
NoGoodsnogoods (void)
 Return no-goods. More...
 
virtual ~Worker (void)
 Destructor. More...
 
- Public Member Functions inherited from Gecode::Search::Worker
 Worker (void)
 Initialize. More...
 
void start (void)
 Reset stop information. More...
 
bool stop (const Options &o)
 Check whether engine must be stopped. More...
 
bool stopped (void) const
 Check whether engine has been stopped. More...
 
void reset (unsigned long int d=0)
 Reset statistics with root depth d. More...
 
void stack_depth (unsigned long int d)
 Record stack depth d. More...
 
unsigned long int steal_depth (unsigned long int d) const
 Return steal depth. More...
 
- Public Member Functions inherited from Gecode::Search::Statistics
 Statistics (void)
 Initialize. More...
 
void reset (void)
 Reset. More...
 
Statistics operator+ (const Statistics &s)
 Return sum with s. More...
 
Statisticsoperator+= (const Statistics &s)
 Increment by statistics s. More...
 
- Public Member Functions inherited from Gecode::StatusStatistics
 StatusStatistics (void)
 Initialize. More...
 
void reset (void)
 Reset information. More...
 
StatusStatistics operator+ (const StatusStatistics &s)
 Return sum with s. More...
 
StatusStatisticsoperator+= (const StatusStatistics &s)
 Increment by statistics s. More...
 
- Public Member Functions inherited from Gecode::Support::Runnable
virtual void run (void)=0
 The function that is executed when the thread starts. More...
 
virtual ~Runnable (void)
 Destructor. More...
 

Protected Attributes

Engine_engine
 Reference to engine. More...
 
Support::Mutex m
 Mutex for access to worker. More...
 
Path path
 Current path ins search tree. More...
 
Spacecur
 Current space being explored. More...
 
unsigned int d
 Distance until next clone. More...
 
bool idle
 Whether the worker is idle. More...
 
- Protected Attributes inherited from Gecode::Search::Worker
bool _stopped
 Whether engine has been stopped. More...
 
unsigned long int root_depth
 Depth of root node (for work stealing) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Support::Runnable
static void * operator new (size_t s)
 Allocate memory from heap. More...
 
static void operator delete (void *p)
 Free memory allocated from heap. More...
 
- Public Attributes inherited from Gecode::Search::Statistics
unsigned long int fail
 Number of failed nodes in search tree. More...
 
unsigned long int node
 Number of nodes expanded. More...
 
unsigned long int depth
 Maximum depth of search stack. More...
 
unsigned long int restart
 Number of restarts. More...
 
unsigned long int nogood
 Number of no-goods posted. More...
 
- Public Attributes inherited from Gecode::StatusStatistics
unsigned long int propagate
 Number of propagator executions. More...
 
bool wmp
 Whether a weakly monotonic propagator might have been executed. More...
 

Detailed Description

Parallel depth-first search worker

Definition at line 52 of file engine.hh.

Constructor & Destructor Documentation

Gecode::Search::Parallel::Engine::Worker::Worker ( Space s,
Engine e 
)
inline

Initialize for space s with engine e.

Definition at line 241 of file engine.hh.

Gecode::Search::Parallel::Engine::Worker::~Worker ( void  )
virtual

Destructor.

Reimplemented in Gecode::Search::Parallel::BAB::Worker.

Definition at line 108 of file engine.cpp.

Member Function Documentation

Space * Gecode::Search::Parallel::Engine::Worker::steal ( unsigned long int &  d)
inline

Hand over some work (NULL if no work available)

Definition at line 396 of file engine.hh.

Statistics Gecode::Search::Parallel::Engine::Worker::statistics ( void  )
inline

Return statistics.

Definition at line 277 of file engine.hh.

Engine & Gecode::Search::Parallel::Engine::Worker::engine ( void  ) const
inline

Provide access to engine.

Definition at line 201 of file engine.hh.

NoGoods & Gecode::Search::Parallel::Engine::Worker::nogoods ( void  )
inline

Return no-goods.

Definition at line 418 of file engine.hh.

Member Data Documentation

Engine& Gecode::Search::Parallel::Engine::Worker::_engine
protected

Reference to engine.

Definition at line 55 of file engine.hh.

Support::Mutex Gecode::Search::Parallel::Engine::Worker::m
protected

Mutex for access to worker.

Definition at line 57 of file engine.hh.

Path Gecode::Search::Parallel::Engine::Worker::path
protected

Current path ins search tree.

Definition at line 59 of file engine.hh.

Space* Gecode::Search::Parallel::Engine::Worker::cur
protected

Current space being explored.

Definition at line 61 of file engine.hh.

unsigned int Gecode::Search::Parallel::Engine::Worker::d
protected

Distance until next clone.

Definition at line 63 of file engine.hh.

bool Gecode::Search::Parallel::Engine::Worker::idle
protected

Whether the worker is idle.

Definition at line 65 of file engine.hh.


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