Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

class hierarchy for FlowGraph nodes

memaher
Beginner
107 Views

Apology's up front if this turns out to be a stupid question: I'm getting my head in a right old tangle with the template functions...

I'm trying to design a reconfigurable flowgraph framework: whereby the actual makeup of the flowgraph can be dynamically created at runtime (from a configuration file). The flowgraph would consist of:

- function_node

- multifunction_node

- source_node

- join_node (working in conjunction with a function_node).

There is only a single datatype flowing through all of these nodes, lets call it CDataClass*.

In order to support the dynamic creation of these different types of nodes, I was hoping to have a single array (or vector[]) of a base class type, then instantiate the specific node types as common-interface descendants of the base class. However (and this is where I'm getting in a tangle with the templates), it looks like every different type of node has a different interface - both in the constructor and operator(), making the thought of having a common base type almost impossible.

Can anyone suggest a means to achieving this 'dynamic' behaviour, or advise if I'm missing something here?

cheers

Mat

0 Kudos
1 Reply
RafSchietekat
Black Belt
107 Views

Each of those "isa" graph_node.

Reply