The OpenVX Specification
r31169
|
Defines the Parameter Object interface.
An abstract input, output, or bidirectional data object passed to a computer vision function. This object contains the signature of that parameter's usage from the kernel description. This information includes:
VX_TYPE_IMAGE
or VX_TYPE_ARRAY
or some other object type from vx_type_e
. VX_INPUT
, VX_OUTPUT
, or VX_BIDIRECTIONAL
. VX_PARAMETER_STATE_REQUIRED
or VX_PARAMETER_STATE_OPTIONAL
. Typedefs | |
typedef struct _vx_parameter * | vx_parameter |
An opaque reference to a single parameter. More... | |
Enumerations | |
enum | vx_direction_e { VX_INPUT = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_DIRECTION << 12)) + 0x0, VX_OUTPUT = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_DIRECTION << 12)) + 0x1, VX_BIDIRECTIONAL = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_DIRECTION << 12)) + 0x2 } |
An indication of how a kernel will treat the given parameter. More... | |
enum | vx_parameter_attribute_e { VX_PARAMETER_ATTRIBUTE_INDEX = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_PARAMETER << 8)) + 0x0, VX_PARAMETER_ATTRIBUTE_DIRECTION = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_PARAMETER << 8)) + 0x1, VX_PARAMETER_ATTRIBUTE_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_PARAMETER << 8)) + 0x2, VX_PARAMETER_ATTRIBUTE_STATE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_PARAMETER << 8)) + 0x3, VX_PARAMETER_ATTRIBUTE_REF = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_PARAMETER << 8)) + 0x4 } |
The parameter attributes list. More... | |
enum | vx_parameter_state_e { VX_PARAMETER_STATE_REQUIRED = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_PARAMETER_STATE << 12)) + 0x0, VX_PARAMETER_STATE_OPTIONAL = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_PARAMETER_STATE << 12)) + 0x1 } |
The parameter state type. More... | |
Functions | |
vx_parameter VX_API_CALL | vxGetKernelParameterByIndex (vx_kernel kernel, vx_uint32 index) |
Retrieves a vx_parameter from a vx_kernel . More... | |
vx_parameter VX_API_CALL | vxGetParameterByIndex (vx_node node, vx_uint32 index) |
Retrieves a vx_parameter from a vx_node . More... | |
vx_status VX_API_CALL | vxQueryParameter (vx_parameter param, vx_enum attribute, void *ptr, vx_size size) |
Allows the client to query a parameter to determine its meta-information. More... | |
vx_status VX_API_CALL | vxReleaseParameter (vx_parameter *param) |
Releases a reference to a parameter object. The object may not be garbage collected until its total reference count is zero. More... | |
vx_status VX_API_CALL | vxSetParameterByIndex (vx_node node, vx_uint32 index, vx_reference value) |
Sets the specified parameter data for a kernel on the node. More... | |
vx_status VX_API_CALL | vxSetParameterByReference (vx_parameter parameter, vx_reference value) |
Associates a parameter reference and a data reference with a kernel on a node. More... | |
typedef struct _vx_parameter* vx_parameter |
An opaque reference to a single parameter.
Definition at line 181 of file vx_types.h.
enum vx_direction_e |
An indication of how a kernel will treat the given parameter.
Enumerator | |
---|---|
VX_INPUT |
The parameter is an input only. |
VX_OUTPUT |
The parameter is an output only. |
VX_BIDIRECTIONAL |
The parameter is both an input and output. |
Definition at line 558 of file vx_types.h.
The parameter attributes list.
Enumerator | |
---|---|
VX_PARAMETER_ATTRIBUTE_INDEX |
Queries a parameter for its index value on the kernel with which it is associated. Use a |
VX_PARAMETER_ATTRIBUTE_DIRECTION |
Queries a parameter for its direction value on the kernel with which it is associated. Use a |
VX_PARAMETER_ATTRIBUTE_TYPE |
Queries a parameter for its type, vx_type_e is returned. The size of the parameter is implied for plain data objects. For opaque data objects like images and arrays a query to their attributes has to be called to determine the size. |
VX_PARAMETER_ATTRIBUTE_STATE |
Queries a parameter for its state. A value in |
VX_PARAMETER_ATTRIBUTE_REF |
Use to extract the reference contained in the parameter. Use a |
Definition at line 784 of file vx_types.h.
enum vx_parameter_state_e |
The parameter state type.
Definition at line 1090 of file vx_types.h.
vx_parameter VX_API_CALL vxGetKernelParameterByIndex | ( | vx_kernel | kernel, |
vx_uint32 | index | ||
) |
Retrieves a vx_parameter
from a vx_kernel
.
[in] | kernel | The reference to the kernel. |
[in] | index | The index of the parameter. |
vx_parameter
. 0 | Either the kernel or index is invalid. |
* | The parameter reference. |
vx_parameter VX_API_CALL vxGetParameterByIndex | ( | vx_node | node, |
vx_uint32 | index | ||
) |
Retrieves a vx_parameter
from a vx_node
.
[in] | node | The node from which to extract the parameter. |
[in] | index | The index of the parameter to which to get a reference. |
vx_parameter
vx_status VX_API_CALL vxReleaseParameter | ( | vx_parameter * | param | ) |
Releases a reference to a parameter object. The object may not be garbage collected until its total reference count is zero.
[in] | param | The pointer to the parameter to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If param is not a vx_parameter . |
vx_status VX_API_CALL vxSetParameterByIndex | ( | vx_node | node, |
vx_uint32 | index, | ||
vx_reference | value | ||
) |
Sets the specified parameter data for a kernel on the node.
[in] | node | The node that contains the kernel. |
[in] | index | The index of the parameter desired. |
[in] | value | The reference to the parameter. |
vx_status_e
enumeration.vx_status VX_API_CALL vxSetParameterByReference | ( | vx_parameter | parameter, |
vx_reference | value | ||
) |
Associates a parameter reference and a data reference with a kernel on a node.
[in] | parameter | The reference to the kernel parameter. |
[in] | value | The value to associate with the kernel parameter. |
vx_status_e
enumeration.vx_status VX_API_CALL vxQueryParameter | ( | vx_parameter | param, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Allows the client to query a parameter to determine its meta-information.
[in] | param | The reference to the parameter. |
[in] | attribute | The attribute to query. Use a vx_parameter_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.