Embedded Multicore Building Blocks V1.0.0
|
Generic parallel process template. More...
#include <network.h>
Public Types | |
typedef embb::base::Function< void, INPUT_TYPE_LIST, OUTPUT_TYPE_LIST > | FunctionType |
Function type to use when processing tokens. More... | |
typedef Inputs< INPUT_TYPE_LIST > | InputsType |
Input port type list. More... | |
typedef Outputs< OUTPUT_TYPE_LIST > | OutputsType |
Output port type list. More... | |
Public Member Functions | |
ParallelProcess (Network &network, FunctionType function) | |
Constructs a ParallelProcess with a user specified processing function. More... | |
ParallelProcess (Network &network, embb::mtapi::Job job) | |
Constructs a ParallelProcess with a user specified embb::mtapi::Job. More... | |
ParallelProcess (Network &network, FunctionType function, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a ParallelProcess with a user specified processing function. More... | |
ParallelProcess (Network &network, embb::mtapi::Job job, embb::mtapi::ExecutionPolicy const &policy) | |
Constructs a ParallelProcess with a user specified embb::mtapi::Job. More... | |
virtual bool | HasInputs () const |
InputsType & | GetInputs () |
template<int Index> | |
InputsType::Types< Index >::Result & | GetInput () |
virtual bool | HasOutputs () const |
OutputsType & | GetOutputs () |
template<int Index> | |
OutputsType::Types< Index >::Result & | GetOutput () |
template<typename T > | |
void | operator>> (T &target) |
Connects output port 0 to input port 0 of target . More... | |
Generic parallel process template.
Implements a generic parallel process in the network that may have one to four input ports and one to four output ports but no more that five total ports. Tokens are processed as soon as all inputs for that token are complete.
typedef embb::base::Function<void, INPUT_TYPE_LIST, OUTPUT_TYPE_LIST> embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::FunctionType |
Function type to use when processing tokens.
typedef Inputs<INPUT_TYPE_LIST> embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::InputsType |
Input port type list.
typedef Outputs<OUTPUT_TYPE_LIST> embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::OutputsType |
Output port type list.
embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::ParallelProcess | ( | Network & | network, |
FunctionType | function | ||
) |
Constructs a ParallelProcess with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to process a token. |
embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::ParallelProcess | ( | Network & | network, |
embb::mtapi::Job | job | ||
) |
Constructs a ParallelProcess with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a struct containing copies of the inputs as its argument buffer and a struct containing the outputs as its result buffer.
network | The network this node is going to be part of. |
job | The embb::mtapi::Job to process a token. |
embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::ParallelProcess | ( | Network & | network, |
FunctionType | function, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a ParallelProcess with a user specified processing function.
network | The network this node is going to be part of. |
function | The Function to call to process a token. |
policy | The execution policy of the process. |
embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::ParallelProcess | ( | Network & | network, |
embb::mtapi::Job | job, | ||
embb::mtapi::ExecutionPolicy const & | policy | ||
) |
Constructs a ParallelProcess with a user specified embb::mtapi::Job.
The Job must be associated with an action function accepting a struct containing copies of the inputs as its argument buffer and a struct containing the outputs as its result buffer.
network | The network this node is going to be part of. |
job | The embb::mtapi::Job to process a token. |
policy | The execution policy of the process. |
|
virtual |
true
if the ParallelProcess has any inputs, false
otherwise. InputsType& embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::GetInputs | ( | ) |
InputsType::Types<Index>::Result& embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::GetInput | ( | ) |
|
virtual |
true
if the ParallelProcess has any outputs, false
otherwise. OutputsType& embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::GetOutputs | ( | ) |
OutputsType::Types<Index>::Result& embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::GetOutput | ( | ) |
void embb::dataflow::Network::ParallelProcess< Inputs, Outputs >::operator>> | ( | T & | target | ) |
Connects output port 0 to input port 0 of target
.
target | Process to connect to. |
T | Type of target process. |