The OpenVX Specification
dba1aa3
|
Defines the Node Object interface.
A node is an instance of a kernel that will be paired with a specific set of references (the parameters). Nodes are created from and associated with a single graph only. When a vx_parameter
is extracted from a Node, an additional attribute can be accessed:
vx_reference
assigned to this parameter index from the Node creation function (e.g., vxSobel3x3Node
). Typedefs | |
typedef struct _vx_node * | vx_node |
An opaque reference to a kernel node. More... | |
Enumerations | |
enum | vx_node_attribute_e { VX_NODE_STATUS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x0, VX_NODE_PERFORMANCE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x1, VX_NODE_BORDER = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x2, VX_NODE_LOCAL_DATA_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x3, VX_NODE_LOCAL_DATA_PTR = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x4, VX_NODE_PARAMETERS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x5, VX_NODE_IS_REPLICATED = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x6, VX_NODE_REPLICATE_FLAGS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x7, VX_NODE_VALID_RECT_RESET = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x8 } |
The node attributes list. More... | |
Functions | |
vx_status VX_API_CALL | vxQueryNode (vx_node node, vx_enum attribute, void *ptr, vx_size size) |
Allows a user to query information out of a node. More... | |
vx_status VX_API_CALL | vxReleaseNode (vx_node *node) |
Releases a reference to a Node object. The object may not be garbage collected until its total reference count is zero. More... | |
vx_status VX_API_CALL | vxRemoveNode (vx_node *node) |
Removes a Node from its parent Graph and releases it. More... | |
vx_status VX_API_CALL | vxReplicateNode (vx_graph graph, vx_node first_node, vx_bool replicate[], vx_uint32 number_of_parameters) |
Creates replicas of the same node first_node to process a set of objects stored in vx_pyramid or vx_object_array . first_node needs to have as parameter levels 0 of a vx_pyramid or the index 0 of a vx_object_array . Replica nodes are not accessible by the application through any means. An application request for removal of first_node from the graph will result in removal of all replicas. Any change of parameter or attribute of first_node will be propagated to the replicas. vxVerifyGraph shall enforce consistency of parameters and attributes in the replicas. More... | |
vx_status VX_API_CALL | vxSetNodeAttribute (vx_node node, vx_enum attribute, const void *ptr, vx_size size) |
Allows a user to set attribute of a node before Graph Validation. More... | |
vx_status VX_API_CALL | vxSetNodeTarget (vx_node node, vx_enum target_enum, const char *target_string) |
Sets the node target to the provided value. A success invalidates the graph that the node belongs to (vxVerifyGraph must be called before the next execution) More... | |
typedef struct _vx_node* vx_node |
An opaque reference to a kernel node.
Definition at line 201 of file vx_types.h.
enum vx_node_attribute_e |
The node attributes list.
Enumerator | |
---|---|
VX_NODE_STATUS |
Queries the status of node execution. Read-only. Use a |
VX_NODE_PERFORMANCE |
Queries the performance of the node execution. The accuracy of timing information is platform dependent and also depends on the graph optimizations. Read-only.
|
VX_NODE_BORDER |
Gets or sets the border mode of the node. Read-write. Use a |
VX_NODE_LOCAL_DATA_SIZE |
Indicates the size of the kernel local memory area. Read-only. Can be written only at user-node (de)initialization if VX_KERNEL_LOCAL_DATA_SIZE==0. Use a |
VX_NODE_LOCAL_DATA_PTR |
Indicates the pointer kernel local memory area. Read-Write. Can be written only at user-node (de)initialization if VX_KERNEL_LOCAL_DATA_SIZE==0. Use a void * parameter. |
VX_NODE_PARAMETERS |
Indicates the number of node parameters, including optional parameters that are not passed. Read-only. Use a |
VX_NODE_IS_REPLICATED |
Indicates whether the node is replicated. Read-only. Use a |
VX_NODE_REPLICATE_FLAGS |
Indicates the replicated parameters. Read-only. Use a |
VX_NODE_VALID_RECT_RESET |
Indicates the behavior with respect to the valid rectangle. Read-only. Use a |
Definition at line 886 of file vx_types.h.
vx_status VX_API_CALL vxQueryNode | ( | vx_node | node, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Allows a user to query information out of a node.
[in] | node | The reference to the node to query. |
[in] | attribute | Use vx_node_attribute_e value to query for information. |
[out] | ptr | The location at which to store the resulting value. |
[in] | size | The size in bytesin bytes of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
VX_ERROR_INVALID_PARAMETERS | The type or size is incorrect. |
vx_status VX_API_CALL vxSetNodeAttribute | ( | vx_node | node, |
vx_enum | attribute, | ||
const void * | ptr, | ||
vx_size | size | ||
) |
Allows a user to set attribute of a node before Graph Validation.
[in] | node | The reference to the node to set. |
[in] | attribute | Use vx_node_attribute_e value to set the desired attribute. |
[in] | ptr | The pointer to the desired value of the attribute. |
[in] | size | The size in bytes of the objects to which ptr points. |
vx_kernel
, which was used to create the node. Some of these can be overridden using this API, notably VX_NODE_LOCAL_DATA_SIZE and VX_NODE_LOCAL_DATA_PTR.vx_status_e
enumeration. VX_SUCCESS | The attribute was set; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
VX_ERROR_INVALID_PARAMETERS | size is not correct for the type needed. |
vx_status VX_API_CALL vxReleaseNode | ( | vx_node * | node | ) |
Releases a reference to a Node object. The object may not be garbage collected until its total reference count is zero.
[in] | node | The pointer to the reference of the node to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
vx_status VX_API_CALL vxRemoveNode | ( | vx_node * | node | ) |
Removes a Node from its parent Graph and releases it.
[in] | node | The pointer to the node to remove and release. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
vx_status VX_API_CALL vxSetNodeTarget | ( | vx_node | node, |
vx_enum | target_enum, | ||
const char * | target_string | ||
) |
Sets the node target to the provided value. A success invalidates the graph that the node belongs to (vxVerifyGraph
must be called before the next execution)
[in] | node | The reference to the vx_node object. |
[in] | target_enum | The target enum to be set to the vx_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 | Node target set; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
VX_ERROR_NOT_SUPPORTED | If the node kernel is not supported by the specified target. |
vx_status VX_API_CALL vxReplicateNode | ( | vx_graph | graph, |
vx_node | first_node, | ||
vx_bool | replicate[], | ||
vx_uint32 | number_of_parameters | ||
) |
Creates replicas of the same node first_node to process a set of objects stored in vx_pyramid
or vx_object_array
. first_node needs to have as parameter levels 0 of a vx_pyramid
or the index 0 of a vx_object_array
. Replica nodes are not accessible by the application through any means. An application request for removal of first_node from the graph will result in removal of all replicas. Any change of parameter or attribute of first_node will be propagated to the replicas. vxVerifyGraph
shall enforce consistency of parameters and attributes in the replicas.
[in] | graph | The reference to the graph. |
[in] | first_node | The reference to the node in the graph that will be replicated. |
[in] | replicate | an array of size equal to the number of node parameters, vx_true_e for the parameters that should be iterated over (should be a reference to a vx_pyramid or a vx_object_array), vx_false_e for the parameters that should be the same across replicated nodes and for optional parameters that are not used. Should be vx_true_e for all output and bidirectional parameters. |
[in] | number_of_parameters | number of elements in the replicate array |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | graph is not a valid vx_graph reference, or first_node is not a valid vx_node reference. |
VX_ERROR_NOT_COMPATIBLE | At least one of replicated parameters is not of level 0 of a pyramid or at index 0 of an object array. |
VX_FAILURE | If the node does not belong to the graph, or the number of objects in the parent objects of inputs and output are not the same. |