CoreFlow 1.0.0
A modern orchestration and execution runtime
|
The Public LUT API. More...
Typedefs | |
typedef struct Lut * | vx_lut |
The Look-Up Table (LUT) Object. | |
Enumerations | |
enum | vx_lut_attribute_e { VX_LUT_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x0 , VX_LUT_COUNT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x1 , VX_LUT_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x2 , VX_LUT_OFFSET = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS,VX_TYPE_LUT) + 0x3 } |
The Look-Up Table (LUT) attribute list. More... | |
Functions | |
VX_API_ENTRY vx_lut VX_API_CALL | vxCreateLUT (vx_context context, vx_enum data_type, vx_size count) |
Creates LUT object of a given type. The value of VX_LUT_OFFSET is equal to 0 for data_type = VX_TYPE_UINT8 , and (vx_uint32)(count/2) for VX_TYPE_INT16 . | |
VX_API_ENTRY vx_lut VX_API_CALL | vxCreateVirtualLUT (vx_graph graph, vx_enum data_type, vx_size count) |
Creates an opaque reference to a LUT object with no direct user access. | |
VX_API_ENTRY 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. | |
VX_API_ENTRY vx_status VX_API_CALL | vxQueryLUT (vx_lut lut, vx_enum attribute, void *ptr, vx_size size) |
Queries attributes from a LUT. | |
VX_API_ENTRY vx_status VX_API_CALL | vxCopyLUT (vx_lut lut, void *user_ptr, vx_enum usage, vx_enum user_mem_type) |
Allows the application to copy from/into a LUT object. | |
VX_API_ENTRY vx_status VX_API_CALL | vxMapLUT (vx_lut lut, vx_map_id *map_id, void **ptr, vx_enum usage, vx_enum mem_type, vx_bitfield flags) |
Allows the application to get direct access to LUT object. | |
VX_API_ENTRY vx_status VX_API_CALL | vxUnmapLUT (vx_lut lut, vx_map_id map_id) |
Unmap and commit potential changes to LUT object that was previously mapped. Unmapping a LUT invalidates the memory location from which the LUT data could be accessed by the application. Accessing this memory location after the unmap function completes has an undefined behavior. | |
The Public LUT API.
typedef struct Lut* vx_lut |
#include <vx_types.h>
The Look-Up Table (LUT) Object.
enum vx_lut_attribute_e |
#include <vx_types.h>
The Look-Up Table (LUT) attribute list.
Enumerator | |
---|---|
VX_LUT_TYPE | Indicates the value type of the LUT. Read-only. Use a |
VX_LUT_COUNT | Indicates the number of elements in the LUT. Read-only. Use a |
VX_LUT_SIZE | Indicates the total size of the LUT in bytes. Read-only. Uses a |
VX_LUT_OFFSET | Indicates the index of the input value = 0. Read-only. Uses a |
VX_API_ENTRY vx_status VX_API_CALL vxCopyLUT | ( | vx_lut | lut, |
void * | user_ptr, | ||
vx_enum | usage, | ||
vx_enum | user_mem_type ) |
#include <vx_api.h>
Allows the application to copy from/into a LUT object.
[in] | lut | The reference to the LUT object that is the source or the destination of the copy. |
[in] | user_ptr | The address of the memory location where to store the requested data if the copy was requested in read mode, or from where to get the data to store into the LUT object if the copy was requested in write mode. In the user memory, the LUT is represented as a array with elements of the type corresponding to VX_LUT_TYPE , and with a number of elements equal to the value returned via VX_LUT_COUNT . The accessible memory must be large enough to contain this array: accessible memory in bytes >= sizeof(data_element) * count. |
[in] | usage | This declares the effect of the copy with regard to the LUT object using the vx_accessor_e enumeration. Only VX_READ_ONLY and VX_WRITE_ONLY are supported:
|
[in] | user_mem_type | A vx_memory_type_e enumeration that specifies the memory type of the memory referenced by the user_addr. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | lut is not a valid vx_lut reference. |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
VX_API_ENTRY vx_lut VX_API_CALL vxCreateLUT | ( | vx_context | context, |
vx_enum | data_type, | ||
vx_size | count ) |
#include <vx_api.h>
Creates LUT object of a given type. The value of VX_LUT_OFFSET
is equal to 0 for data_type = VX_TYPE_UINT8
, and (vx_uint32)(count/2) for VX_TYPE_INT16
.
[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
. VX_API_ENTRY vx_lut VX_API_CALL vxCreateVirtualLUT | ( | vx_graph | graph, |
vx_enum | data_type, | ||
vx_size | count ) |
#include <vx_api.h>
Creates an opaque reference to a LUT object with no direct user access.
[in] | graph | The reference to the parent graph. |
[in] | data_type | The type of data stored in the LUT. |
[in] | count | The number of entries desired. |
vxCreateLUT
vx_lut
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. VX_API_ENTRY vx_status VX_API_CALL vxMapLUT | ( | vx_lut | lut, |
vx_map_id * | map_id, | ||
void ** | ptr, | ||
vx_enum | usage, | ||
vx_enum | mem_type, | ||
vx_bitfield | flags ) |
#include <vx_api.h>
Allows the application to get direct access to LUT object.
[in] | lut | The reference to the LUT object to map. |
[out] | map_id | The address of a vx_map_id variable where the function returns a map identifier.
|
[out] | ptr | The address of a pointer that the function sets to the address where the requested data can be accessed. In the mapped memory area, the LUT data are structured as an array with elements of the type corresponding to VX_LUT_TYPE , with a number of elements equal to the value returned via VX_LUT_COUNT . Accessing the memory out of the bound of this array is forbidden and has an undefined behavior. The returned (*ptr) address is only valid between the call to the function and the corresponding call to vxUnmapLUT . |
[in] | usage | This declares the access mode for the LUT, using the vx_accessor_e enumeration.
|
[in] | mem_type | A vx_memory_type_e enumeration that specifies the type of the memory where the LUT is requested to be mapped. |
[in] | flags | An integer that allows passing options to the map operation. Use 0 for this option. |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | lut is not a valid vx_lut reference. |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
vxUnmapLUT
with same (*map_id) value. VX_API_ENTRY vx_status VX_API_CALL vxQueryLUT | ( | vx_lut | lut, |
vx_enum | attribute, | ||
void * | ptr, | ||
vx_size | size ) |
#include <vx_api.h>
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. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | lut is not a valid vx_lut reference. |
VX_API_ENTRY vx_status VX_API_CALL vxReleaseLUT | ( | vx_lut * | lut | ) |
#include <vx_api.h>
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; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | lut is not a valid vx_lut reference. |
VX_API_ENTRY vx_status VX_API_CALL vxUnmapLUT | ( | vx_lut | lut, |
vx_map_id | map_id ) |
#include <vx_api.h>
Unmap and commit potential changes to LUT object that was previously mapped. Unmapping a LUT invalidates the memory location from which the LUT data could be accessed by the application. Accessing this memory location after the unmap function completes has an undefined behavior.
[in] | lut | The reference to the LUT object to unmap. |
[out] | map_id | The unique map identifier that was returned when calling vxMapLUT . |
vx_status_e
enumeration. VX_SUCCESS | No errors; any other value indicates failure. |
VX_ERROR_INVALID_REFERENCE | lut is not a valid vx_lut reference. |
VX_ERROR_INVALID_PARAMETERS | An other parameter is incorrect. |
vxMapLUT
returning the same map_id value