#include <multiprocessor.h>
Collaboration diagram for Geddei::MultiProcessor:
Public Member Functions | |
void | init (const QString &name="", const Properties &properties=Properties()) |
void | init (const QString &name, ProcessorGroup &group, const Properties &properties=Properties()) |
MultiProcessor (MultiProcessorCreator *c) | |
~MultiProcessor () | |
Friends | |
class | Processor |
class | ProcessorPort |
Normally, you would set this up for a specific number of portions, lay out the network properly and begin the experiment. If the number of portions changed, you would have to create a whole new network.
With Multiplicity it is possible to declare a single path that each "portion" must take, and declare a point at which a Processor's output should be split (demultiplexed) to go down those paths and another point at which the several paths must come together to reconstitute a single discrete signal again (remultiplexing).
We call any Processing element (i.e. a Processor and a MultiProcessor) that is able to source and/or sink a perhaps configurable number of multiple connections a Multiplicative object or Multiplicity-aware.
Processor objects (and by extension SubProcessor objects) may declare them- selves Multiplicative. The MultiProcessor class is automatically Multiplicative, since it represents the parts of the processing path where the portions are each being processed.
It is important not to confuse the differing meanings of "parallel processing" here. MultiProcessor is, technically, a method of parallel processing. However, unlike DomProcessor/SubProcessor, it adds no extra parallelism from the standard Geddei tools. It is meant merely as a shortcut to be used in particular situations.
Geddei::MultiProcessor::MultiProcessor | ( | MultiProcessorCreator * | c | ) | [inline] |
Basic constructor. Creates a new MultiProcessor object whose Processor constituents are created by the Creator c. See MultiProcessorCreator and its derivative classes for more information about specifying a suitable creator.
c | The MultiProcessorCreator to be used for creating Processor objects in this object. |
Geddei::MultiProcessor::~MultiProcessor | ( | ) |
Default destructor.
void Geddei::MultiProcessor::init | ( | const QString & | name, | |
ProcessorGroup & | group, | |||
const Properties & | properties = Properties() | |||
) | [inline] |
Performs basic object construction that cannot otherwise be done in the constructor due to shared library limitations. Initialises the object fully ready for connect()s and then go().
name | This Processor instance's name, and should be unique across any group or network the processor is in. | |
group | A reference to the ProcessorGroup (if any) that you may use to control a set of objects. | |
properties | The properties with which to initialise this object. This defaults to an empty properties set. If a needed property is left undefined, the default value is taken from the properties() method. |
void Geddei::MultiProcessor::init | ( | const QString & | name = "" , |
|
const Properties & | properties = Properties() | |||
) | [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Performs basic object construction that cannot otherwise be done in the constructor due to shared library limitations. Initialises the object fully ready for connect()s and then go().
name | This Processor instance's name, and should be unique across any group or network the processor is in. This defaults to the empty name, which can be used iff the object is not contained in a ProcessorGroup. | |
properties | The properties with which to initialise this object. This defaults to an empty properties set. If a needed property is left undefined, the default value is taken from the properties() method. |