
Parallel depth-first search worker More...
#include <dfs.hh>
Public Member Functions | |
| Worker (Space *s, size_t sz, DFS &e) | |
| Initialize for space s (of size sz) with engine e. | |
| DFS & | engine (void) const |
| Provide access to engine. | |
| virtual void | run (void) |
| Start execution of worker. | |
| void | find (void) |
| Try to find some work. | |
| Space * | reset (Space *s) |
| Reset engine to restart at space s and return new root space. | |
Public Member Functions inherited from Gecode::Search::Parallel::Engine::Worker | |
| Worker (Space *s, size_t sz, Engine &e) | |
| Initialize for space s (of size sz) with engine e. | |
| Space * | steal (unsigned long int &d) |
| Hand over some work (NULL if no work available) | |
| Statistics | statistics (void) |
| Return statistics. | |
| virtual | ~Worker (void) |
| Destructor. | |
Public Member Functions inherited from Gecode::Search::Worker | |
| Worker (size_t sz) | |
| Initialize with space size sz. | |
| void | start (void) |
| Reset stop information. | |
| bool | stop (const Options &o, size_t sz) |
| Check whether engine must be stopped (with additional stackspace sz) | |
| bool | stopped (void) const |
| Check whether engine has been stopped. | |
| void | push (const Space *s, const Choice *c) |
| New space s and choice c get pushed on stack. | |
| void | constrained (const Space *s1, const Space *s2) |
| Space s1 is replaced by space s2 due to constraining. | |
| void | adapt (const Space *s) |
| New space s is added for adaptive recomputation. | |
| void | pop (const Space *s, const Choice *c) |
| Space s and choice c get popped from stack. | |
| void | lao (const Space *s) |
| Space s gets used for LAO (removed from stack) | |
| void | current (const Space *s) |
| Space s becomes current space (s = NULL: current space deleted) | |
| void | reset (const Space *s, unsigned long int d=0) |
| Reset statistics for space s with root depth d. | |
| void | reset (void) |
| Reset statistics for failed space. | |
| 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. | |
| 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. | |
| 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 | |
| virtual | ~Runnable (void) |
| Destructor. | |
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. | |
Public Attributes inherited from Gecode::Search::Statistics | |
| unsigned long int | fail |
| Number of failed nodes in search tree. | |
| unsigned long int | node |
| Number of nodes expanded. | |
| unsigned long int | depth |
| Maximum depth of search stack. | |
| size_t | memory |
| Peak memory allocated. | |
Protected Attributes inherited from Gecode::Search::Parallel::Engine::Worker | |
| Engine & | _engine |
| Reference to engine. | |
| Support::Mutex | m |
| Mutex for access to worker. | |
| Path | path |
| Current path ins search tree. | |
| Space * | cur |
| Current space being explored. | |
| unsigned int | d |
| Distance until next clone. | |
| bool | idle |
| Whether worker is currently idle. | |
|
inline |
Provide access to engine.
Reimplemented from Gecode::Search::Parallel::Engine::Worker.
|
virtual |
Start execution of worker.
Implements Gecode::Support::Runnable.
|
inline |