TIOVX User Guide
|
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... | |
#define TIVX_TYPE_SUPER_NODE 0x818 |
The object type enumeration for super nodes.
Definition at line 88 of file tivx_ext_super_node.h.
The super node attributes.
Enumerator | |
---|---|
TIVX_SUPER_NODE_TARGET_STRING | Queries the target this super-node is run on. Read-only. Use a |
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.
|
TIVX_SUPER_NODE_STATUS | Queries the status of the super node execution. Read-only. Use a |
TIVX_SUPER_NODE_NUM_NODES | Queries the number of nodes in a super node. Read-only. Use a |
Definition at line 100 of file tivx_ext_super_node.h.
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:
If any of the following coniditions are violated, the object may successfully be created, but may return an error durring graph verification:
[in] | graph | The graph reference. |
[in] | nodes | List of nodes which should be grouped together |
[in] | num_nodes | Number of nodes in nodes[] array |
tivx_super_node
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. 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.
[in] | super_node | The pointer to the super node to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If super_node is not a tivx_super_node . |
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.
[in] | super_node | The reference to the super node. |
[in] | attribute | The attribute to query. Use a tivx_super_node_attribute_e . |
[out] | ptr | The location at which to store the resulting value. |
[in] | size | The size in bytes of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If the super_node is not a tivx_super_node . |
VX_ERROR_NOT_SUPPORTED | If the attribute is not a value supported on this implementation. |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |
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)
[in] | super_node | The reference to the tivx_super_node object. |
[in] | target_enum | The target enum to be set to the tivx_super_node object. Use a vx_target_e . |
[in] | target_string | The target name ASCII string. This contains a valid value when target_enum is set to VX_TARGET_STRING , otherwise it is ignored. |
vx_status_e
enumeration. VX_SUCCESS | Super node target set. |
VX_ERROR_INVALID_REFERENCE | If super_node is not a tivx_super_node or if nodes within the super node is no a vx_node . |
VX_ERROR_NOT_SUPPORTED | If an included node kernel is not supported by the specified target. |
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.
[in] | super_node | The reference to the vx_node object. |
[in] | block_width | The tile width in pixels. |
[in] | block_height | The tile height in lines. |
vx_status_e
enumeration. VX_SUCCESS | if the tile size is set correctly. |