The OpenVX Specification
r31169
|
Defines the Look-Up Table Interface.
A lookup table is an array that simplifies run-time computation by replacing computation with a simpler array indexing operation.
Typedefs | |
typedef struct _vx_lut * | vx_lut |
The Look-Up Table (LUT) Object. | |
Enumerations | |
enum | vx_lut_attribute_e { VX_LUT_ATTRIBUTE_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x0, VX_LUT_ATTRIBUTE_COUNT = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x1, VX_LUT_ATTRIBUTE_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_LUT << 8)) + 0x2 } |
The Look-Up Table (LUT) attribute list. More... | |
Functions | |
vx_status VX_API_CALL | vxAccessLUT (vx_lut lut, void **ptr, vx_enum usage) |
Grants access to a LUT table and increments the object reference count in case of success. More... | |
vx_status VX_API_CALL | vxCommitLUT (vx_lut lut, const void *ptr) |
Commits the Lookup Table and decrements the object reference count in case of success. More... | |
vx_lut VX_API_CALL | vxCreateLUT (vx_context context, vx_enum data_type, vx_size count) |
Creates LUT object of a given type. More... | |
vx_status VX_API_CALL | vxQueryLUT (vx_lut lut, vx_enum attribute, void *ptr, vx_size size) |
Queries attributes from a LUT. More... | |
vx_status VX_API_CALL | vxReleaseLUT (vx_lut *lut) |
Releases a reference to a LUT object. The object may not be garbage collected until its total reference count is zero. More... | |
enum vx_lut_attribute_e |
The Look-Up Table (LUT) attribute list.
Enumerator | |
---|---|
VX_LUT_ATTRIBUTE_TYPE |
Indicates the value type of the LUT. Use a |
VX_LUT_ATTRIBUTE_COUNT |
Indicates the number of elements in the LUT. Use a |
VX_LUT_ATTRIBUTE_SIZE |
Indicates the total size of the LUT in bytes. Uses a |
Definition at line 842 of file vx_types.h.
vx_lut VX_API_CALL vxCreateLUT | ( | vx_context | context, |
vx_enum | data_type, | ||
vx_size | count | ||
) |
Creates LUT object of a given type.
[in] | context | The reference to the context. |
[in] | data_type | The type of data stored in the LUT. |
[in] | count | The number of entries desired. |
vx_lut
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. Releases a reference to a LUT object. The object may not be garbage collected until its total reference count is zero.
[in] | lut | The pointer to the LUT to release. |
vx_status_e
enumeration. VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If lut is not a vx_lut . |
Queries attributes from a LUT.
[in] | lut | The LUT to query. |
[in] | attribute | The attribute to query. Use a vx_lut_attribute_e enumeration. |
[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. Grants access to a LUT table and increments the object reference count in case of success.
There are several variations of call methodology:
vxCommitLUT
. vxQueryLUT
with VX_LUT_ATTRIBUTE_SIZE
to determine how much memory to allocate for the LUT data.In any case, vxCommitLUT
must be called after LUT access is complete.
[in] | lut | The LUT from which to get the data. |
[in,out] | ptr | ptr The user-supplied address to a pointer, via which the requested contents are returned.
|
[in] | usage | This declares the intended usage of the pointer using the * vx_accessor_e enumeration. |
vx_status_e
enumeration. vxCommitLUT
Commits the Lookup Table and decrements the object reference count in case of success.
Commits the data back to the LUT object and decrements the reference count. There are several variations of call methodology:
vxAccessLUT
was NULL, it is undefined whether the implementation will unmap or copy and free the memory. [in] | lut | The LUT to modify. |
[in] | ptr | The pointer provided or returned by vxAccessLUT . This cannot be NULL. |
vx_status_e
enumeration. vxAccessLUT
.