29 #ifndef SYNTHESIS_APPLICATOR_H
30 #define SYNTHESIS_APPLICATOR_H
void init(casacore::Int argc, casacore::Char *argv[])
Initialization (includes parallel transport initialization)
casacore::Int put(const casacore::Bool &b)
casacore::Int put(const casacore::Array< casacore::Double > &an)
void defineAlgorithms()
Fill algorithm map.
PTransport * comm
Pointer to the parallel transport.
std::map< casacore::Int, Algorithm * > knownAlgorithms
casacore::Vector< casacore::Int > procStatus
Process status list.
casacore::Int nProcs
Number of processes.
std::complex< Float > Complex
casacore::Int put(const casacore::Array< casacore::Int > &an)
Defines a computational unit for parallel processing.
std::map< casacore::String, casacore::Int > algorithmIds
casacore::Map of known algorithm names and id.
casacore::Int nextProcessDone(Algorithm &a, casacore::Bool &allDone)
Return the rank of the next process to complete the specified Algorithm.
Signals
Recognized signals.
casacore::Bool nextAvailProcess(Algorithm &a, casacore::Int &rank)
Assign the next free worker process to a specified Algorithm.
void loop()
Executed by worker process waiting for an assigned task.
casacore::Int LastID
ID for the last Algorithm defined.
Class which provides an interface to the parallelization infrastructure.
casacore::Int put(const casacore::String &s)
Applicator()
Default constructor, and destructor.
casacore::Int findFreeProc(casacore::Bool &lastOne)
casacore::Int put(const casacore::Array< casacore::Complex > &an)
virtual casacore::Int put(const casacore::Array< casacore::Float > &)=0
Get and put functions on the parallel data transport layer.
casacore::Int put(const casacore::Double &n)
casacore::Int put(const casacore::Array< casacore::DComplex > &an)
Status
Enum to define the process status table.
casacore::Int put(const casacore::Int &n)
std::complex< Double > DComplex
casacore::Int put(const casacore::Float &n)
casacore::Bool usedAllThreads
true if no more processes are free
void done()
Signal that a worker process is done.
casacore::Int put(const casacore::DComplex &n)
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
Base class for parallel data transport models.
casacore::Bool isController()
Status functions to indicate whether this Applicator is executing as a controller or worker process...
casacore::Int numProcs()
Return the number of processes.
casacore::Int put(const casacore::Array< casacore::Float > &an)
Put and get methods to be executed on the parallel transport layer.
casacore::Bool isWorker()
String: the storage and methods of handling collections of characters.
void defineAlgorithm(Algorithm *)
define an Algorithm if we need too;
void apply(Algorithm &a)
Execute an algorithm directly.
casacore::Bool isSerial()
true if executing serially
casacore::Int put(const casacore::Record &r)
virtual casacore::Int get(casacore::Array< casacore::Float > &)=0
casacore::Bool serial
true if executing in serial
casacore::Int put(const casacore::Complex &n)
void setupProcStatus()
Utility functions for the current list of processes, and their status.