Applicator.h
Classes
- Applicator -- Class which provides an interface to the parallelization infrastructure (full description)
Types
- FREE
-
- ASSIGNED
-
- STOP = 0
-
Interface
- Public Members
- Applicator()
- ~Applicator()
- void init(Int argc, Char *argv[])
- void initThreads(Int argc, Char *argv[])
- void initThreads()
- void defineAlgorithm(Algorithm *)
- Bool isController()
- Bool isWorker()
- Bool isSerial()
- Int numProcs()
- Bool nextAvailProcess(Algorithm &a, Int &rank)
- Int nextProcessDone(Algorithm &a, Bool &allDone)
- void done()
- void apply(Algorithm &a)
- Int put(const Array<Float> &an)
- Int put(const Array<Double> &an)
- Int put(const Array<Int> &an)
- Int put(const Array<Complex> &an)
- Int put(const Array<DComplex> &an)
- Int put(const Float &n)
- Int put(const Complex &n)
- Int put(const DComplex &n)
- Int put(const Double &n)
- Int put(const Int &n)
- Int put(const Bool &b)
- Int put(const String &s)
- Int put(const Record &r)
- Int get(Array<Float> &an)
- Int get(Array<Double> &an)
- Int get(Array<Complex> &an)
- Int get(Array<DComplex> &an)
- Int get(Array<Int> &an)
- Int get(Float &n)
- Int get(Double &n)
- Int get(Complex &n)
- Int get(DComplex &n)
- Int get(Int &n)
- Int get(Bool &b)
- Int get(String &s)
- Int get(Record &r)
- Private Members
- void loop()
- void defineAlgorithms()
- void setupProcStatus()
- Int findFreeProc(Bool &lastOne)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
Applies or controls the execution of parallelized algorithms.
Synopsis
The Applicator class provides the interface to parallel communication.
It holds the parallel transport layer, and controls the execution of
parallelized algorithms.
Example
Motivation
To provide a simple programming interface to parallelization, and
to encapsulate the transport layer and parallel process control.
Member Description
Enum to define the process status table
Recognized signals
Default constructor, and destructor
void init(Int argc, Char *argv[])
Initialization (includes parallel transport initialization)
void initThreads(Int argc, Char *argv[])
define an Algorithm if we need too;
Status functions to indicate whether this Applicator is
executing as a controller or worker process
True if executing serially
Return the number of processes
Assign the next free worker process to a specified Algorithm
Return the rank of the next process to complete the specified Algorithm
Signal that a worker process is done
Execute an algorithm directly
Int put(const Array<Float> &an)
Put and get methods to be executed on the parallel transport layer
Int put(const Array<Double> &an)
Int put(const Array<Int> &an)
Int put(const Array<Complex> &an)
Int put(const Array<DComplex> &an)
Int put(const Float &n)
Int put(const Complex &n)
Int put(const DComplex &n)
Int put(const Double &n)
Int put(const Int &n)
Int put(const Bool &b)
Int get(Array<Float> &an)
Int get(Array<Double> &an)
Int get(Array<Complex> &an)
Int get(Array<DComplex> &an)
Int get(Float &n)
Int get(Double &n)
Int get(Complex &n)
Int get(DComplex &n)
Int get(Int &n)
Int get(Bool &b)
Executed by worker process waiting for an assigned task
Fill algorithm map
Utility functions for the current list of processes, and their status