The Original CHomP Software
|
This class defines a worker for the multi-work subdivision framework. More...
#include <mwsubdiv.h>
Public Member Functions | |
mwSubWorker (fcompute _compute) | |
The constructor. More... | |
![]() | |
mwWorker () | |
The default constructor. More... | |
virtual | ~mwWorker () |
The destructor. More... | |
int | Work () |
Runs the worker on this computer. More... | |
void | KeepWorker (bool keep=true) |
Makes the worker keep running after the coordinator has disconnected. More... | |
![]() | |
mwTask () | |
The default constructor. More... | |
virtual | ~mwTask () |
The destructor. More... | |
void | Port (int number) |
Sets the port number for the communication or 0 to use none. More... | |
int | Port () const |
Returns the current port number. More... | |
void | ControlNumber (unsigned int number) |
Sets the control number for identification. More... | |
unsigned int | ControlNumber () const |
Returns the currently set identification control number. More... | |
void | TimeOut (int seconds) |
Sets the network connection time-out interval in seconds. More... | |
int | TimeOut () const |
Returns the currently set network connection time-out interval. More... | |
int | LogFile (const char *filename) |
Begins logging detailed communication debug information to the given file. More... | |
void | LogFile (const mwTask &other) |
Uses another task's log file to log this task's information. More... | |
void | LogClose () |
Closes the log file and adds a line with the time information unless this log file was borrowed from another task. More... | |
int | Add (const char *name, int port=-1) |
Adds an address to the list of computers to connect to at the beginning of working or coordinating. More... | |
int | Load (const char *filename) |
Loads computer addresses from the given file. More... | |
int | QuitWorkers () |
Quits all the workers whose addresses were added with the 'Add' and 'Load' functions. More... | |
Private Member Functions | |
int | Process (mwData &data) |
A function for processing the data by a worker. More... | |
Private Attributes | |
fcompute | compute |
The address of a function to use for the computations. More... | |
Additional Inherited Members | |
![]() | |
static int | SendMessage (int fd, unsigned int ctrl, unsigned int code, const mwData &x) |
Sends a message with data to the given socket. More... | |
static int | RecvMessage (int fd, unsigned int &ctrl, unsigned int &code, mwData &x) |
Receives a message with data from the given socket. More... | |
![]() | |
std::ofstream * | logFile |
The debug log file stream. More... | |
std::vector< std::string > | computers |
A list of workers or coordinators to connect to at start-up. More... | |
std::vector< int > | ports |
A list of port numbers of workers to connect to at start-up. More... | |
This class defines a worker for the multi-work subdivision framework.
Definition at line 107 of file mwsubdiv.h.
|
inline |
The constructor.
Definition at line 125 of file mwsubdiv.h.
|
privatevirtual |
A function for processing the data by a worker.
Reimplemented from chomp::multiwork::mwWorker.
Definition at line 134 of file mwsubdiv.h.
References chomp::multiwork::mwOk, chomp::multiwork::mwReject, and chomp::homology::sout.
|
private |
The address of a function to use for the computations.
Definition at line 118 of file mwsubdiv.h.