CCA
|
#include <Splitter.h>
Public Member Functions | |
Splitter (std::string nodename, unsigned int dimensionality) | |
Splitter (std::string nodename, nemo::IntVector config) | |
Creates a splitter with specific splitting configuration. | |
~Splitter () | |
void | onProcess () |
Processing. | |
virtual void | configureOutputPortByIndex (unsigned int index, PortConfigurationPtr portcfg) |
Configure output port by number. | |
virtual void | configureOutputPortByIndex (unsigned int index, const std::string &scope) |
Configure output port by number. | |
Static Public Member Functions | |
static NodePtr | create (std::string nodename, unsigned int number) |
Constructing a splitter for the given data-type and a given number of outputs. | |
static NodePtr | create (std::string nodename, nemo::IntVector config) |
Creates a splitter shared pointer with specific splitting configuration. | |
static NodePtr | create (std::string nodename, int first, int second) |
Creates a splitter shared pointer with specific splitting configuration. | |
static NodePtr | create (std::string nodename, int first, int second, int third) |
Creates a splitter shared pointer with specific splitting configuration. | |
static NodePtr | create (unsigned int number) |
Constructing a splitter for the given data-type and a given number of outputs. | |
Private Attributes | |
unsigned int | dim |
nemo::IntVector | splitConfig |
InputPort< DTOTYPE >::Ptr | ip |
std::vector< typename OutputPort< DTOTYPE >::Ptr > | ops |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Splitter< DTOTYPE > &node) |
Stream operator. |
Detailed Description
template<class DTOTYPE>
class cca::Splitter< DTOTYPE >
DTO Splitter.
Splitting up multi-dimensional DTOs and sending one-dimensional items of same type over the output ports. Works for any DataTransferObject and any dimension.
Definition at line 45 of file Splitter.h.
Constructor & Destructor Documentation
cca::Splitter< DTOTYPE >::Splitter | ( | std::string | nodename, |
unsigned int | dimensionality | ||
) | [inline] |
- Parameters:
-
nodename Name of this splitter node dimensionality Dimensionality (corresponds to dimensionality of incoming DTO, as well as to the number of output ports)
Definition at line 56 of file Splitter.h.
References cca::Node::create(), cca::Splitter< DTOTYPE >::dim, cca::Splitter< DTOTYPE >::ip, cca::Splitter< DTOTYPE >::ops, cca::PortTriggered::port(), cca::Node::registerPort(), and cca::Node::setProcessingStrategy().
cca::Splitter< DTOTYPE >::Splitter | ( | std::string | nodename, |
nemo::IntVector | config | ||
) | [inline] |
Creates a splitter with specific splitting configuration.
An integer vector specifies, how to split up the incoming dto. E.g. {1, 2} to split an incoming 3-dimensional DTO into an 1-dimensional and 2-dimensional DTO.
- Parameters:
-
nodename Name of this splitter node config Configuration of splitting.
Definition at line 85 of file Splitter.h.
References cca::Node::create(), cca::Splitter< DTOTYPE >::dim, cca::Splitter< DTOTYPE >::ip, cca::Splitter< DTOTYPE >::ops, cca::PortTriggered::port(), cca::Node::registerPort(), cca::Node::setProcessingStrategy(), and cca::Splitter< DTOTYPE >::splitConfig.
cca::Splitter< DTOTYPE >::~Splitter | ( | ) | [inline] |
Definition at line 105 of file Splitter.h.
Member Function Documentation
virtual void cca::Splitter< DTOTYPE >::configureOutputPortByIndex | ( | unsigned int | index, |
PortConfigurationPtr | portcfg | ||
) | [inline, virtual] |
Configure output port by number.
- Parameters:
-
index Number of the output port to configure portcfg PortConfiguration, either PortConfiguration::LOCAL() or PortConfiguration::REMOTE() with given Scope, default is the local port.
Definition at line 232 of file Splitter.h.
References cca::Node::configureOutputPort().
virtual void cca::Splitter< DTOTYPE >::configureOutputPortByIndex | ( | unsigned int | index, |
const std::string & | scope | ||
) | [inline, virtual] |
Configure output port by number.
- Parameters:
-
index Number of the output port to configure scope Connecting scope
Definition at line 247 of file Splitter.h.
References cca::Node::configureOutputPort().
static NodePtr cca::Splitter< DTOTYPE >::create | ( | std::string | nodename, |
unsigned int | number | ||
) | [inline, static] |
Constructing a splitter for the given data-type and a given number of outputs.
- Parameters:
-
nodename number
- Returns:
Definition at line 139 of file Splitter.h.
static NodePtr cca::Splitter< DTOTYPE >::create | ( | std::string | nodename, |
nemo::IntVector | config | ||
) | [inline, static] |
Creates a splitter shared pointer with specific splitting configuration.
An integer vector specifies, how to split up the incoming dto. E.g. {1, 2} to split an incoming 3-dimensional DTO into an 1-dimensional and 2-dimensional DTO.
- Parameters:
-
nodename Name of this splitter node config Configuration of splitting.
Definition at line 153 of file Splitter.h.
static NodePtr cca::Splitter< DTOTYPE >::create | ( | std::string | nodename, |
int | first, | ||
int | second | ||
) | [inline, static] |
Creates a splitter shared pointer with specific splitting configuration.
Two integer arguments specify, how to split up the incoming dto. E.g. first=1, second=2 to split an incoming 3-dimensional DTO into an 1-dimensional and 2-dimensional DTO.
- Parameters:
-
nodename Name of this splitter node first Size of first split second Size of second split
Definition at line 170 of file Splitter.h.
static NodePtr cca::Splitter< DTOTYPE >::create | ( | std::string | nodename, |
int | first, | ||
int | second, | ||
int | third | ||
) | [inline, static] |
Creates a splitter shared pointer with specific splitting configuration.
Three integer arguments specify, how to split up the incoming dto. E.g. first=1, second=2, third=1 to split an incoming 4-dimensional DTO into an 1-dimensional, 2-dimensional and another 1-dimensional DTO.
- Parameters:
-
nodename Name of this splitter node first Size of first split second Size of second split third Size of third split
Definition at line 191 of file Splitter.h.
static NodePtr cca::Splitter< DTOTYPE >::create | ( | unsigned int | number | ) | [inline, static] |
Constructing a splitter for the given data-type and a given number of outputs.
- Parameters:
-
nodename number
- Returns:
Definition at line 205 of file Splitter.h.
void cca::Splitter< DTOTYPE >::onProcess | ( | ) | [inline, virtual] |
Processing.
Takes the incoming data item, splits it up into one-dimensionsal items and sends them over the output port.
Implements cca::Node.
Definition at line 112 of file Splitter.h.
References cca::Splitter< DTOTYPE >::dim, cca::InputPort< DATATYPE >::empty(), cca::InputPort< DATATYPE >::get(), cca::Node::getName(), cca::Splitter< DTOTYPE >::ip, cca::Splitter< DTOTYPE >::ops, and cca::Splitter< DTOTYPE >::splitConfig.
Friends And Related Function Documentation
std::ostream& operator<< | ( | std::ostream & | os, |
const Splitter< DTOTYPE > & | node | ||
) | [friend] |
Member Data Documentation
unsigned int cca::Splitter< DTOTYPE >::dim [private] |
Definition at line 255 of file Splitter.h.
Referenced by cca::Splitter< DTOTYPE >::onProcess(), and cca::Splitter< DTOTYPE >::Splitter().
InputPort<DTOTYPE>::Ptr cca::Splitter< DTOTYPE >::ip [private] |
Definition at line 257 of file Splitter.h.
Referenced by cca::Splitter< DTOTYPE >::onProcess(), and cca::Splitter< DTOTYPE >::Splitter().
std::vector<typename OutputPort<DTOTYPE>::Ptr> cca::Splitter< DTOTYPE >::ops [private] |
Definition at line 258 of file Splitter.h.
Referenced by cca::Splitter< DTOTYPE >::onProcess(), and cca::Splitter< DTOTYPE >::Splitter().
nemo::IntVector cca::Splitter< DTOTYPE >::splitConfig [private] |
Definition at line 256 of file Splitter.h.
Referenced by cca::Splitter< DTOTYPE >::onProcess(), and cca::Splitter< DTOTYPE >::Splitter().
The documentation for this class was generated from the following file:
- cca/nodes/Splitter.h