Modifying Node Properties
After you add nodes to a graph and connect them with edges, inspect the nodes to ensure the data flowing through the graph has correct types. Some data types are dictated by the
Intel® oneAPI Threading Building Blocks
(oneTBB
) flow graph node types themselves or by the logic the graph represents. Because the data flows through nodes and edges are connected to ports, the data types are managed at the port level. The default node data types are
int
for most ports and
continue_msg
for nodes that expect this type of data.
To edit node properties:
- Select a node.
- In thePort Informationpane of theNodetab, change theData Typeof a port by selecting its type and editing the field.For certain nodes, such as ajoin_node, only the input port data types can be modified, and the output data type is automatically generated when you update the input port data types.
- Select a node on the canvas to see its properties in theNodetab. This property pane displays all properties for a given node type. The properties that are not set for the selected node type are shown in a darker color. In the figure below, you can see that theDescriptionproperty is not set for thejoin_node.Some of the properties for the nodes are set automatically and tied to the node type. Such properties are not available for editing and theNode Propertiestab enforces these rules. For example, you cannot change theNode Type, but you can edit theNode Weightand theNode Name.
- TheNode Weightis a placeholder that indicates the computational complexity of a node. The larger the number, the more computationally intensive the node is with respect to the other nodes in the graph. This number is also used by the C++ code generator to create a busy loop in the empty body that is created for each node. See the Generating C++ Stubs section for more details.
- TheNode Nameis a unique name automatically assigned to each new node. You can change it to something meaningful. This name is a variable name of the object generated for the node by the C++ code generator.