Defines a computational unit for parallel processing. More...
#include <Algorithm.h>
Public Member Functions | |
| Algorithm () | |
| Default constructor and destructor. | |
| virtual | ~Algorithm () |
| void | apply () |
| Generic apply to execute the parallel task. | |
| virtual void | get ()=0 |
| Get the input data and parameters from the controller. | |
| virtual void | put ()=0 |
| Return the results to the controller. | |
| virtual String & | name ()=0 |
| Return the name of the algorithm. | |
Protected Member Functions | |
| virtual void | task ()=0 |
| Do the work assigned as a parallel task. | |
Defines a computational unit for parallel processing.
Internal or
Internal
Base class used to define a computational unit for parallel processing. The user supplies: i) the get() (fetch the data); ii) the task() (do the work); iii) the put() (send the results back); and iv) the name() (name of the task).
The algorithm class is used for embarassingly- or nearly-embarassingly types of parallel problems.
Base class. User always derives off this class
Definition at line 85 of file Algorithm.h.
| casa::Algorithm::Algorithm | ( | ) | [inline] |
Default constructor and destructor.
Definition at line 88 of file Algorithm.h.
| virtual casa::Algorithm::~Algorithm | ( | ) | [inline, virtual] |
Definition at line 89 of file Algorithm.h.
| void casa::Algorithm::apply | ( | ) | [inline] |
Generic apply to execute the parallel task.
Definition at line 92 of file Algorithm.h.
References casa::applicator, casa::Applicator::done(), put(), and task().
| virtual void casa::Algorithm::get | ( | ) | [pure virtual] |
Get the input data and parameters from the controller.
Implemented in casa::ClarkCleanAlgorithm, casa::MakeApproxPSFAlgorithm, casa::PredictAlgorithm, casa::ReadMSAlgorithm, and casa::ResidualAlgorithm.
| virtual String& casa::Algorithm::name | ( | ) | [pure virtual] |
Return the name of the algorithm.
Implemented in casa::ClarkCleanAlgorithm, casa::MakeApproxPSFAlgorithm, casa::PredictAlgorithm, casa::ReadMSAlgorithm, and casa::ResidualAlgorithm.
| virtual void casa::Algorithm::put | ( | ) | [pure virtual] |
Return the results to the controller.
Implemented in casa::ClarkCleanAlgorithm, casa::MakeApproxPSFAlgorithm, casa::PredictAlgorithm, casa::ReadMSAlgorithm, and casa::ResidualAlgorithm.
Referenced by apply().
| virtual void casa::Algorithm::task | ( | ) | [protected, pure virtual] |
Do the work assigned as a parallel task.
Implemented in casa::ClarkCleanAlgorithm, casa::MakeApproxPSFAlgorithm, casa::PredictAlgorithm, casa::ReadMSAlgorithm, and casa::ResidualAlgorithm.
Referenced by apply().
1.6.1