CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches

The Public Node API. More...

Typedefs

typedef struct Node * vx_node
 An opaque reference to a kernel node.
 

Enumerations

enum  vx_node_attribute_e {
  VX_NODE_STATUS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x0 ,
  VX_NODE_PERFORMANCE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x1 ,
  VX_NODE_BORDER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x2 ,
  VX_NODE_LOCAL_DATA_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x3 ,
  VX_NODE_LOCAL_DATA_PTR = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x4 ,
  VX_NODE_PARAMETERS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x5 ,
  VX_NODE_IS_REPLICATED = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x6 ,
  VX_NODE_REPLICATE_FLAGS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x7 ,
  VX_NODE_VALID_RECT_RESET = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0x8
}
 The node attributes list. More...
 

Functions

VX_API_ENTRY 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.
 
VX_API_ENTRY 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.
 
VX_API_ENTRY 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.
 
VX_API_ENTRY vx_status VX_API_CALL vxRemoveNode (vx_node *node)
 Removes a Node from its parent Graph and releases it.
 
VX_API_ENTRY 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)
 
VX_API_ENTRY 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.
 

Detailed Description

The Public Node API.

Typedef Documentation

◆ vx_node

typedef struct Node* vx_node

#include <vx_types.h>

An opaque reference to a kernel node.

See also
vxCreateGenericNode

Enumeration Type Documentation

◆ vx_node_attribute_e

#include <vx_types.h>

The node attributes list.

Enumerator
VX_NODE_STATUS 

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

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.

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

Gets or sets the border mode of the node. Read-write. Use a vx_border_t structure with a default value of VX_BORDER_UNDEFINED.

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_size parameter.

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_uint32 parameter.

VX_NODE_IS_REPLICATED 

Indicates whether the node is replicated. Read-only. Use a vx_bool parameter.

VX_NODE_REPLICATE_FLAGS 

Indicates the replicated parameters. Read-only. Use a vx_bool* parameter.

VX_NODE_VALID_RECT_RESET 

Indicates the behavior with respect to the valid rectangle. Read-only. Use a vx_bool parameter.

Function Documentation

◆ vxQueryNode()

VX_API_ENTRY vx_status VX_API_CALL vxQueryNode ( vx_node node,
vx_enum attribute,
void * ptr,
vx_size size )

#include <vx_api.h>

Allows a user to query information out of a node.

Parameters
[in]nodeThe reference to the node to query.
[in]attributeUse vx_node_attribute_e value to query for information.
[out]ptrThe location at which to store the resulting value.
[in]sizeThe size in bytesin bytes of the container to which ptr points.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference.
VX_ERROR_INVALID_PARAMETERSThe type or size is incorrect.

◆ vxReleaseNode()

VX_API_ENTRY vx_status VX_API_CALL vxReleaseNode ( vx_node * node)

#include <vx_api.h>

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

Parameters
[in]nodeThe pointer to the reference of the node to release.
Postcondition
After returning from this function the reference is zeroed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference.
Examples
bubble_pop.cpp, canny.cpp, optical_flow.cpp, orb.cpp, and skinToneDetector.cpp.

◆ vxRemoveNode()

VX_API_ENTRY vx_status VX_API_CALL vxRemoveNode ( vx_node * node)

#include <vx_api.h>

Removes a Node from its parent Graph and releases it.

Parameters
[in]nodeThe pointer to the node to remove and release.
Postcondition
After returning from this function the reference is zeroed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference.

◆ vxReplicateNode()

VX_API_ENTRY vx_status VX_API_CALL vxReplicateNode ( vx_graph graph,
vx_node first_node,
vx_bool replicate[],
vx_uint32 number_of_parameters )

#include <vx_api.h>

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.

Parameters
[in]graphThe reference to the graph.
[in]first_nodeThe reference to the node in the graph that will be replicated.
[in]replicatean 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 parameters.
[in]number_of_parametersnumber of elements in the replicate array
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEgraph is not a valid vx_graph reference, or first_node is not a valid vx_node reference.
VX_ERROR_NOT_COMPATIBLEAt least one of replicated parameters is not of level 0 of a pyramid or at index 0 of an object array.
VX_FAILUREIf 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.

◆ vxSetNodeAttribute()

VX_API_ENTRY vx_status VX_API_CALL vxSetNodeAttribute ( vx_node node,
vx_enum attribute,
const void * ptr,
vx_size size )

#include <vx_api.h>

Allows a user to set attribute of a node before Graph Validation.

Parameters
[in]nodeThe reference to the node to set.
[in]attributeUse vx_node_attribute_e value to set the desired attribute.
[in]ptrThe pointer to the desired value of the attribute.
[in]sizeThe size in bytes of the objects to which ptr points.
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.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSThe attribute was set; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference.
VX_ERROR_INVALID_PARAMETERSsize is not correct for the type needed.

◆ vxSetNodeTarget()

VX_API_ENTRY vx_status VX_API_CALL vxSetNodeTarget ( vx_node node,
vx_enum target_enum,
const char * target_string )

#include <vx_api.h>

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)

Parameters
[in]nodeThe reference to the vx_node object.
[in]target_enumThe target enum to be set to the vx_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_SUCCESSNode target set; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference.
VX_ERROR_NOT_SUPPORTEDIf the node kernel is not supported by the specified target.