TIOVX User Guide

Detailed Description

APIs creating and using super node framework type.

Defines

#define TIVX_TYPE_SUPER_NODE   0x818
 The object type enumeration for super nodes. More...
 

Typedefs

typedef struct _tivx_super_node * tivx_super_node
 The Super Node Framework Object. Super Node is a strongly-typed container for connected nodes.
 

Enumerations

enum  tivx_super_node_attribute_e {
  TIVX_SUPER_NODE_TARGET_STRING = VX_ATTRIBUTE_BASE(VX_ID_TI, TIVX_TYPE_SUPER_NODE) + 0x0,
  TIVX_SUPER_NODE_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_TI, TIVX_TYPE_SUPER_NODE) + 0x1,
  TIVX_SUPER_NODE_STATUS = VX_ATTRIBUTE_BASE(VX_ID_TI, TIVX_TYPE_SUPER_NODE) + 0x2,
  TIVX_SUPER_NODE_NUM_NODES = VX_ATTRIBUTE_BASE(VX_ID_TI, TIVX_TYPE_SUPER_NODE) + 0x3
}
 The super node attributes. More...
 

Functions

VX_API_ENTRY tivx_super_node VX_API_CALL tivxCreateSuperNode (vx_graph graph, vx_node nodes[], uint32_t num_nodes)
 Creates a reference to a super node object. More...
 
VX_API_ENTRY vx_status VX_API_CALL tivxReleaseSuperNode (tivx_super_node *super_node)
 Releases a reference to a super node object. The object may not be garbage collected until its total reference count is zero. More...
 
VX_API_ENTRY vx_status VX_API_CALL tivxQuerySuperNode (tivx_super_node super_node, vx_enum attribute, void *ptr, vx_size size)
 Queries the super node for some specific information. More...
 
VX_API_ENTRY vx_status VX_API_CALL tivxSetSuperNodeTarget (tivx_super_node super_node, vx_enum target_enum, const char *target_string)
 Sets the super node target to the provided value. A success invalidates the graph that the super node belongs to (vxVerifyGraph must be called before the next execution) More...
 
VX_API_ENTRY vx_status VX_API_CALL tivxSetSuperNodeTileSize (tivx_super_node super_node, vx_uint32 block_width, vx_uint32 block_height)
 Sets the tile size for a given supernode in a graph. This is only valid for BAM-enabled kernels on C66 DSP. More...
 

Macro Definition Documentation

◆ TIVX_TYPE_SUPER_NODE

#define TIVX_TYPE_SUPER_NODE   0x818

The object type enumeration for super nodes.

A tivx_super_node.

Definition at line 89 of file tivx_ext_super_node.h.

Enumeration Type Documentation

◆ tivx_super_node_attribute_e

The super node attributes.

Enumerator
TIVX_SUPER_NODE_TARGET_STRING 

Queries the target this super-node is run on. Read-only. Use a vx_char[] parameter of size TIVX_TARGET_MAX_NAME.

TIVX_SUPER_NODE_PERFORMANCE 

Queries the performance of the super node execution. The accuracy of timing information is platform dependent and also depends on the graph optimizations. Read-only.

Note
Performance tracking must have been enabled. See vx_directive_e.
TIVX_SUPER_NODE_STATUS 

Queries the status of the super node execution. Read-only. Use a vx_status parameter.

TIVX_SUPER_NODE_NUM_NODES 

Queries the number of nodes in a super node. Read-only. Use a vx_uint32 parameter.

Definition at line 101 of file tivx_ext_super_node.h.

Function Documentation

◆ tivxCreateSuperNode()

VX_API_ENTRY tivx_super_node VX_API_CALL tivxCreateSuperNode ( vx_graph  graph,
vx_node  nodes[],
uint32_t  num_nodes 
)

Creates a reference to a super node object.

This API is used to identify a grouping of nodes for the purpose of optimizing data movement between the nodes. The framework will attempt to parallelize the processing of all nodes in this group on the same processor such that each node operates on a block of memory at a time in a pipelined fashion so that intermediate data accesses can stay in local RAM instead of going to DDR. This reduces the overall DDR bandwidth requirement as well as increases performance.

If any of the following conditions are violated, the object will not be created and an error will be registered:

  • All nodes in this super node must not be included in a different super node
  • All nodes in this super node must be part of the 'graph' graph reference.

If any of the following conditions are violated, the object may successfully be created, but may return an error durring graph verification:

  • All nodes must map to the same processor core
  • All nodes must be connected via one or more edges
  • All nodes must have implementations which support this kind of node fusion (i.e. BAM if on C66x).
Parameters
[in]graphThe graph reference.
[in]nodesList of nodes which should be grouped together
[in]num_nodesNumber of nodes in nodes[] array
Returns
A super node reference tivx_super_node. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ tivxReleaseSuperNode()

VX_API_ENTRY vx_status VX_API_CALL tivxReleaseSuperNode ( tivx_super_node super_node)

Releases a reference to a super node object. The object may not be garbage collected until its total reference count is zero.

Parameters
[in]super_nodeThe pointer to the super node to release.
Postcondition
After returning from this function the reference is zeroed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.
VX_ERROR_INVALID_REFERENCEIf super_node is not a tivx_super_node.

◆ tivxQuerySuperNode()

VX_API_ENTRY vx_status VX_API_CALL tivxQuerySuperNode ( tivx_super_node  super_node,
vx_enum  attribute,
void *  ptr,
vx_size  size 
)

Queries the super node for some specific information.

Parameters
[in]super_nodeThe reference to the super node.
[in]attributeThe attribute to query. Use a tivx_super_node_attribute_e.
[out]ptrThe location at which to store the resulting value.
[in]sizeThe size in bytes of the container to which ptr points.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors.
VX_ERROR_INVALID_REFERENCEIf the super_node is not a tivx_super_node.
VX_ERROR_NOT_SUPPORTEDIf the attribute is not a value supported on this implementation.
VX_ERROR_INVALID_PARAMETERSIf any of the other parameters are incorrect.

◆ tivxSetSuperNodeTarget()

VX_API_ENTRY vx_status VX_API_CALL tivxSetSuperNodeTarget ( tivx_super_node  super_node,
vx_enum  target_enum,
const char *  target_string 
)

Sets the super node target to the provided value. A success invalidates the graph that the super node belongs to (vxVerifyGraph must be called before the next execution)

Parameters
[in]super_nodeThe reference to the tivx_super_node object.
[in]target_enumThe target enum to be set to the tivx_super_node object. Use a vx_target_e.
[in]target_stringThe target name ASCII string. This contains a valid value when target_enum is set to VX_TARGET_STRING, otherwise it is ignored.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSSuper node target set.
VX_ERROR_INVALID_REFERENCEIf super_node is not a tivx_super_node or if nodes within the super node is no a vx_node .
VX_ERROR_NOT_SUPPORTEDIf an included node kernel is not supported by the specified target.

◆ tivxSetSuperNodeTileSize()

VX_API_ENTRY vx_status VX_API_CALL tivxSetSuperNodeTileSize ( tivx_super_node  super_node,
vx_uint32  block_width,
vx_uint32  block_height 
)

Sets the tile size for a given supernode in a graph. This is only valid for BAM-enabled kernels on C66 DSP.

Parameters
[in]super_nodeThe reference to the vx_node object.
[in]block_widthThe tile width in pixels.
[in]block_heightThe tile height in lines.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSif the tile size is set correctly.