The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Object: Node

Detailed Description

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:

Typedefs

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

Enumerations

enum  vx_node_attribute_e {
  VX_NODE_ATTRIBUTE_STATUS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x0,
  VX_NODE_ATTRIBUTE_PERFORMANCE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x1,
  VX_NODE_ATTRIBUTE_BORDER_MODE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x2,
  VX_NODE_ATTRIBUTE_LOCAL_DATA_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x3,
  VX_NODE_ATTRIBUTE_LOCAL_DATA_PTR = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_NODE << 8)) + 0x4
}
 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 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...
 

Typedef Documentation

typedef struct _vx_node* vx_node

An opaque reference to a kernel node.

See also
vxCreateGenericNode

Definition at line 188 of file vx_types.h.

Enumeration Type Documentation

The node attributes list.

Enumerator
VX_NODE_ATTRIBUTE_STATUS 

Queries the status of node execution. Use a vx_status parameter.

VX_NODE_ATTRIBUTE_PERFORMANCE 

Queries the performance of the node execution. Use a vx_perf_t parameter.

VX_NODE_ATTRIBUTE_BORDER_MODE 

Gets or sets the border mode of the node. Use a vx_border_mode_t structure.

VX_NODE_ATTRIBUTE_LOCAL_DATA_SIZE 

Indicates the size of the kernel local memory area. Use a vx_size parameter.

VX_NODE_ATTRIBUTE_LOCAL_DATA_PTR 

Indicates the pointer kernel local memory area. Use a void * parameter.

Definition at line 762 of file vx_types.h.

Function Documentation

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.

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_SUCCESSSuccessful
VX_ERROR_INVALID_PARAMETERSThe 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.

Parameters
[in]nodeThe reference to the node to set.
[in]attributeUse vx_node_attribute_e value to query for information.
[out]ptrThe output pointer to where to send the value.
[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_ATTRIBUTE_LOCAL_DATA_SIZE and VX_NODE_ATTRIBUTE_LOCAL_DATA_PTR.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSThe attribute was set.
VX_ERROR_INVALID_REFERENCEnode is not a vx_node.
VX_ERROR_INVALID_PARAMETERsize 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.

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.
VX_ERROR_INVALID_REFERENCEIf node is not a vx_node.
vx_status VX_API_CALL vxRemoveNode ( vx_node node)

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.
VX_ERROR_INVALID_REFERENCEIf node is not a vx_node.