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:
|
typedef struct _vx_node * | vx_node |
| An opaque reference to a kernel node. More...
|
|
|
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 [R00795]. 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 [R00796]. An application request for removal of first_node from the graph will result in removal of all replicas [R00797]. Any change of parameter or attribute of first_node will be propagated to the replicas [R00798]. vxVerifyGraph shall enforce consistency of parameters and attributes in the replicas [R00799]. 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) [R00790]. More...
|
|
◆ vx_node
◆ vxQueryNode()
Allows a user to query information out of a node.
- Parameters
-
[in] | node | The reference to the node to query [R00765]. |
[in] | attribute | Use The Node Attribute Constants value to query for information [R00766]. |
[out] | ptr | The location at which to store the resulting value [R00767]. |
[in] | size | The size in bytesin bytes of the container to which ptr points [R00768]. |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R00769]. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
VX_ERROR_INVALID_PARAMETERS | The type or size is incorrect. |
◆ vxSetNodeAttribute()
Allows a user to set attribute of a node before Graph Validation.
- Parameters
-
[in] | node | The reference to the node to set [R00770]. |
[in] | attribute | Use The Node Attribute Constants value to set the desired attribute [R00771]. |
[in] | ptr | The pointer to the desired value of the attribute [R00772]. |
[in] | size | The size in bytes of the objects to which ptr points [R00773]. |
- Note
- Some attributes are inherited from the
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 [R00774].
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | The attribute was set; any other value indicates failure [R00775]. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
VX_ERROR_INVALID_PARAMETERS | size is not correct for the type needed. |
◆ vxReleaseNode()
Releases a reference to a Node object. The object may not be garbage collected until its total reference count is zero.
- Parameters
-
[in,out] | node | The pointer to the reference of the node to release [R00776]. |
- Postcondition
- After returning from this function the reference is zeroed [R00777].
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R00778]. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
◆ vxRemoveNode()
Removes a Node from its parent Graph and releases it.
- Parameters
-
[in,out] | node | The pointer to the node to remove and release [R00779]. |
- Postcondition
- After returning from this function the reference is zeroed [R00780].
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R00781]. |
VX_ERROR_INVALID_REFERENCE | node is not a valid vx_node reference. |
◆ vxSetNodeTarget()
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) [R00790].
- Parameters
-
[in] | node | The reference to the vx_node object [R00791]. |
[in] | target_enum | The target enum to be set to the vx_node object [R00792]. Use a The Target Enumeration Constants. value. |
[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 [R00793]. |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | Node target set; any other value indicates failure [R00794]. |
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. |
◆ vxReplicateNode()
Creates replicas of the same node first_node to process a set of objects stored in vx_pyramid
or vx_object_array
[R00795]. 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 [R00796]. An application request for removal of first_node from the graph will result in removal of all replicas [R00797]. Any change of parameter or attribute of first_node will be propagated to the replicas [R00798]. vxVerifyGraph
shall enforce consistency of parameters and attributes in the replicas [R00799].
- Parameters
-
[in] | graph | The reference to the graph [R00800]. |
[in] | first_node | The reference to the node in the graph that will be replicated [R00801]. |
[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 [R00802]. Should be vx_true_e for all output and bidirectional parameters [R00803]. |
[in] | number_of_parameters | number of elements in the replicate array |
- Returns
- A
The vx_status Constants
value.
- Return values
-
VX_SUCCESS | No errors; any other value indicates failure [R00804]. |
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. |