The OpenVX Specification
r28647
|
Defines the Context Object Interface.
The OpenVX context is the object domain for all OpenVX objects. All data objects live in the context as well as all framework objects. The OpenVX context keeps reference counts on all objects and must do garbage collection during its deconstruction to free lost references. While multiple clients may connect to the OpenVX context, all data are private in that the references referring to data objects are given only to the creating party.
Macros | |
#define | VX_MAX_IMPLEMENTATION_NAME (64) |
Defines the maximum number of characters in a implementation string. | |
Typedefs | |
typedef struct _vx_context * | vx_context |
An opaque reference to the implementation context. More... | |
Enumerations | |
enum | vx_accessor_e { VX_READ_ONLY = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ACCESSOR << 12)) + 0x1, VX_WRITE_ONLY = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ACCESSOR << 12)) + 0x2, VX_READ_AND_WRITE = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ACCESSOR << 12)) + 0x3 } |
The memory accessor hint flags. These enumeration values are used to indicate desired system behavior, not the User intent. For example: these can be interpretted as hints to the system about cache operations or marshalling operations. More... | |
enum | vx_context_attribute_e { VX_CONTEXT_ATTRIBUTE_VENDOR_ID = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x0, VX_CONTEXT_ATTRIBUTE_VERSION = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x1, VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNELS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x2, VX_CONTEXT_ATTRIBUTE_MODULES = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x3, VX_CONTEXT_ATTRIBUTE_REFERENCES = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x4, VX_CONTEXT_ATTRIBUTE_IMPLEMENTATION = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x5, VX_CONTEXT_ATTRIBUTE_EXTENSIONS_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x6, VX_CONTEXT_ATTRIBUTE_EXTENSIONS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x7, VX_CONTEXT_ATTRIBUTE_CONVOLUTION_MAXIMUM_DIMENSION = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x8, VX_CONTEXT_ATTRIBUTE_OPTICAL_FLOW_WINDOW_MAXIMUM_DIMENSION = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0x9, VX_CONTEXT_ATTRIBUTE_IMMEDIATE_BORDER_MODE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0xA, VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNEL_TABLE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_CONTEXT << 8)) + 0xB } |
A list of context attributes. More... | |
enum | vx_import_type_e { VX_IMPORT_TYPE_NONE = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_IMPORT_MEM << 12)) + 0x0, VX_IMPORT_TYPE_HOST = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_IMPORT_MEM << 12)) + 0x1 } |
An enumeration of memory import types. More... | |
enum | vx_round_policy_e { VX_ROUND_POLICY_TO_ZERO = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ROUND_POLICY << 12)) + 0x1, VX_ROUND_POLICY_TO_NEAREST_EVEN = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_ROUND_POLICY << 12)) + 0x2 } |
The Round Policy Enumeration. More... | |
enum | vx_termination_criteria_e { VX_TERM_CRITERIA_ITERATIONS = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_TERM_CRITERIA << 12)) + 0x0, VX_TERM_CRITERIA_EPSILON = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_TERM_CRITERIA << 12)) + 0x1, VX_TERM_CRITERIA_BOTH = ((( VX_ID_KHRONOS ) << 20) | ( VX_ENUM_TERM_CRITERIA << 12)) + 0x2 } |
The termination criteria list. More... | |
Functions | |
vx_context | vxCreateContext () |
Creates a vx_context . More... | |
vx_context | vxGetContext (vx_reference reference) |
Retrieves the context from any reference from within a context. More... | |
vx_status | vxQueryContext (vx_context context, vx_enum attribute, void *ptr, vx_size size) |
Queries the context for some specific information. More... | |
vx_status | vxReleaseContext (vx_context *context) |
Releases the OpenVX object context. More... | |
vx_status | vxSetContextAttribute (vx_context context, vx_enum attribute, void *ptr, vx_size size) |
Sets an attribute on the context. More... | |
typedef struct _vx_context* vx_context |
An opaque reference to the implementation context.
Definition at line 180 of file vx_types.h.
A list of context attributes.
Enumerator | |
---|---|
VX_CONTEXT_ATTRIBUTE_VENDOR_ID |
Queries the unique vendor ID. Use a |
VX_CONTEXT_ATTRIBUTE_VERSION |
Queries the OpenVX Version Number. Use a |
VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNELS |
Queries the context for the number of unique kernels. Use a |
VX_CONTEXT_ATTRIBUTE_MODULES |
Queries the context for the number of active modules. Use a |
VX_CONTEXT_ATTRIBUTE_REFERENCES |
Queries the context for the number of active references. Use a |
VX_CONTEXT_ATTRIBUTE_IMPLEMENTATION |
Queries the context for it's implementation name. Use a |
VX_CONTEXT_ATTRIBUTE_EXTENSIONS_SIZE |
Queries the number of bytes in the extensions string. Use a |
VX_CONTEXT_ATTRIBUTE_EXTENSIONS |
Retrieves the extensions string. This is a space-separated string of extension names. Use a |
VX_CONTEXT_ATTRIBUTE_CONVOLUTION_MAXIMUM_DIMENSION |
The maximum width or height of a convolution matrix. Use a |
VX_CONTEXT_ATTRIBUTE_OPTICAL_FLOW_WINDOW_MAXIMUM_DIMENSION |
The maximum window dimension of the OpticalFlowPyrLK kernel.
|
VX_CONTEXT_ATTRIBUTE_IMMEDIATE_BORDER_MODE |
The border mode for immediate mode functions. Graph mode functions are unaffected by this attribute. Use a pointer to a
|
VX_CONTEXT_ATTRIBUTE_UNIQUE_KERNEL_TABLE |
Returns the table of all unique the kernels that exist in the context. Use a
|
Definition at line 652 of file vx_types.h.
enum vx_import_type_e |
An enumeration of memory import types.
Enumerator | |
---|---|
VX_IMPORT_TYPE_NONE |
For memory allocated through OpenVX, this is the import type. |
VX_IMPORT_TYPE_HOST |
The default memory type to import from the Host. |
Definition at line 982 of file vx_types.h.
The termination criteria list.
Definition at line 1085 of file vx_types.h.
enum vx_accessor_e |
The memory accessor hint flags. These enumeration values are used to indicate desired system behavior, not the User intent. For example: these can be interpretted as hints to the system about cache operations or marshalling operations.
Definition at line 1123 of file vx_types.h.
enum vx_round_policy_e |
The Round Policy Enumeration.
Definition at line 1140 of file vx_types.h.
vx_context vxCreateContext | ( | ) |
Creates a vx_context
.
This creates a top-level object context for OpenVX.
0 | No context was created. |
* | A context reference. |
vxReleaseContext
vx_status vxReleaseContext | ( | vx_context * | context | ) |
Releases the OpenVX object context.
All reference counted objects are garbage-collected by the return of this call. No calls are possible using the parameter context after the context has been released until a new reference from vxCreateContext
is returned. All outstanding references to OpenVX objects from this context are invalid after this call.
[in] | context | The pointer to the reference to the context. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If graph is not a vx_graph . |
vxCreateContext
vx_context vxGetContext | ( | vx_reference | reference | ) |
Retrieves the context from any reference from within a context.
[in] | reference | The reference from which to extract the context. |
vx_status vxQueryContext | ( | vx_context | context, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Queries the context for some specific information.
[in] | context | The reference to the context. |
[in] | attribute | The attribute to query. Use a vx_context_attribute_e . |
[out] | ptr | The location at which to store the resulting value. |
[in] | size | The size of the container to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If the context is not a vx_context . |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |
VX_ERROR_NOT_SUPPORTED | If the attribute is not supported on this implementation. |
vx_status vxSetContextAttribute | ( | vx_context | context, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size | ||
) |
Sets an attribute on the context.
[in] | context | The handle to the overall context. |
[in] | attribute | The attribute to set from vx_context_attribute_e . |
[in] | ptr | The pointer to the data to which to set the attribute. |
[in] | size | The size in bytes of the data to which ptr points. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If the context is not a vx_context . |
VX_ERROR_INVALID_PARAMETERS | If any of the other parameters are incorrect. |
VX_ERROR_NOT_SUPPORTED | If the attribute is not settable. |