TIOVX User Guide
|
APIs for object descriptor manipulation.
Data Structures | |
struct | tivx_remap_point_t |
Remap point in remap table. More... | |
struct | tivx_obj_desc_t |
Object descriptor. More... | |
struct | tivx_obj_desc_node_t |
Node object descriptor. More... | |
struct | tivx_obj_desc_image_t |
Image object descriptor as placed in shared memory. More... | |
struct | tivx_obj_desc_remap_t |
Remap object descriptor as placed in shared memory. More... | |
struct | tivx_obj_desc_matrix_t |
matrix object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_lut_t |
lut object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_pyramid_t |
pyramid object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_convolution_t |
convolution object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_threshold_t |
threshold object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_distribution_t |
distribution object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_array_t |
array object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_user_data_object_t |
user data object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_raw_image_t |
raw image descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_object_array_t |
object array object descriptor as placed in shared memory More... | |
struct | tivx_obj_desc_scalar_t |
Scalar object descriptor as placed in shared memory. More... | |
struct | tivx_obj_desc_tensor_t |
Tensor object descriptor as placed in shared memory. More... | |
Defines | |
#define | TIVX_REF_FLAG_LOG_RT_TRACE (0x00000001u) |
Flag to indicate if run-time trace should be logged. | |
#define | TIVX_REF_FLAG_IS_INVALID (0x00000002u) |
Flag to indicate if ref is invalid. | |
#define | TIVX_NODE_FLAG_IS_REPLICATED (0x00000001u) |
Flag to indicate if node is replicated. | |
#define | TIVX_NODE_FLAG_IS_EXECUTED (0x00000002u) |
Flag to indicate if node is executed. | |
#define | TIVX_NODE_FLAG_IS_USER_CALLBACK (0x00000004u) |
Flag to indicate if user callback is requested after node complete. | |
#define | TIVX_NODE_FLAG_IS_TARGET_KERNEL (0x00000008u) |
Flag to indicate if kernel associated with this node is a user kernel or target kernel. | |
#define | TIVX_NODE_FLAG_IS_SUPERNODE (0x00000010u) |
Flag to indicate if this node is a supernode. | |
#define | TIVX_NODE_OBJ_DESC_STATE_IDLE (0x0u) |
State of a node object descriptor to indicate it is IDLE. | |
#define | TIVX_NODE_OBJ_DESC_STATE_BLOCKED (0x1u) |
State of a node object descriptor to indicate it is BLOCKED. More... | |
#define | TIVX_OBJ_DESC_MAX_HOST_PORT_ID_CPU (16u) |
Max size of the array host_port_id, in tivx_obj_desc_t. | |
Enumerations | |
enum | tivx_obj_desc_type_e { TIVX_OBJ_DESC_IMAGE = 0x0, TIVX_OBJ_DESC_SCALAR = 0x1, TIVX_OBJ_DESC_REMAP = 0x2, TIVX_OBJ_DESC_NODE = 0x3, TIVX_OBJ_DESC_CMD = 0x4, TIVX_OBJ_DESC_MATRIX = 0x5, TIVX_OBJ_DESC_LUT = 0x6, TIVX_OBJ_DESC_CONVOLUTION = 0x7, TIVX_OBJ_DESC_DISTRIBUTION = 0x8, TIVX_OBJ_DESC_THRESHOLD = 0x9, TIVX_OBJ_DESC_ARRAY = 0xA, TIVX_OBJ_DESC_PYRAMID = 0xB, TIVX_OBJ_DESC_OBJARRAY = 0xC, TIVX_OBJ_DESC_KERNEL_NAME = 0xD, TIVX_OBJ_DESC_QUEUE = 0xE, TIVX_OBJ_DESC_DATA_REF_Q = 0xF, TIVX_OBJ_DESC_GRAPH = 0x10, TIVX_OBJ_DESC_TENSOR = 0x11, TIVX_OBJ_DESC_USER_DATA_OBJECT = 0x12, TIVX_OBJ_DESC_RAW_IMAGE = 0x13, TIVX_OBJ_DESC_SUPER_NODE = 0x14, TIVX_OBJ_DESC_INVALID = 0xFFFFu } |
Enum that list all possible object descriptor type's. More... | |
enum | tivx_image_create_type_e { TIVX_IMAGE_NORMAL, TIVX_IMAGE_UNIFORM, TIVX_IMAGE_VIRTUAL, TIVX_IMAGE_FROM_HANDLE, TIVX_IMAGE_FROM_ROI, TIVX_IMAGE_FROM_CHANNEL } |
Method by which image is created. More... | |
Functions | |
tivx_obj_desc_t * | tivxGetObjDescElement (tivx_obj_desc_t *obj_desc, uint16_t elem_idx) |
Function to get the pointer to an element of an object array. If the object being passed is a regular object descriptor then a pointer to the object is returned. More... | |
void | tivx_obj_desc_strncpy (volatile void *dst, volatile void *src, uint32_t size) |
Utility function for memory/string copy/set operation on object descriptor pointers. More... | |
void | tivx_obj_desc_memcpy (volatile void *dst, volatile void *src, uint32_t size) |
Utility function for memory/string copy/set operation on object descriptor pointers. More... | |
void | tivx_obj_desc_memset (volatile void *dst, uint8_t val, uint32_t size) |
Utility function for memory/string copy/set operation on object descriptor pointers. More... | |
int32_t | tivx_obj_desc_strncmp (volatile void *dst, volatile void *src, uint32_t size) |
Utility function for memory/string compare operation on object descriptor pointers. More... | |
int32_t | tivx_obj_desc_strncmp_delim (volatile void *dst, volatile void *src, uint32_t size, char delim) |
Utility function for memory/string compare operation on object descriptor pointers with delimiter. More... | |
#define TIVX_NODE_OBJ_DESC_STATE_BLOCKED (0x1u) |
State of a node object descriptor to indicate it is BLOCKED.
There are two condition for which a node can be block
Definition at line 153 of file tivx_obj_desc.h.
enum tivx_obj_desc_type_e |
Enum that list all possible object descriptor type's.
Definition at line 167 of file tivx_obj_desc.h.
Method by which image is created.
Enumerator | |
---|---|
TIVX_IMAGE_NORMAL | Create using vxCreateImage() |
TIVX_IMAGE_UNIFORM | Create using vxCreateUniformImage() |
TIVX_IMAGE_VIRTUAL | Create using vxCreateVirtualImage() |
TIVX_IMAGE_FROM_HANDLE | Create using vxCreateImageFromHandle() |
TIVX_IMAGE_FROM_ROI | Create using vxCreateImageFromROI() |
TIVX_IMAGE_FROM_CHANNEL | Create using vxCreateImageFromChannel() |
Definition at line 253 of file tivx_obj_desc.h.
tivx_obj_desc_t* tivxGetObjDescElement | ( | tivx_obj_desc_t * | obj_desc, |
uint16_t | elem_idx | ||
) |
Function to get the pointer to an element of an object array. If the object being passed is a regular object descriptor then a pointer to the object is returned.
[in] | obj_desc | object descriptor pointer |
[in] | elem_idx | A valid index with in the object array. This is used only if obj_desc refers to an object descriptor array, otherwise it it ignored. |
void tivx_obj_desc_strncpy | ( | volatile void * | dst, |
volatile void * | src, | ||
uint32_t | size | ||
) |
Utility function for memory/string copy/set operation on object descriptor pointers.
IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making an access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in an unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignment should be avoided and below function used instead
void tivx_obj_desc_memcpy | ( | volatile void * | dst, |
volatile void * | src, | ||
uint32_t | size | ||
) |
Utility function for memory/string copy/set operation on object descriptor pointers.
IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making an access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in an unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignment should be avoided and below function used instead
void tivx_obj_desc_memset | ( | volatile void * | dst, |
uint8_t | val, | ||
uint32_t | size | ||
) |
Utility function for memory/string copy/set operation on object descriptor pointers.
IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making an access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in an unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignment should be avoided and below function used instead
int32_t tivx_obj_desc_strncmp | ( | volatile void * | dst, |
volatile void * | src, | ||
uint32_t | size | ||
) |
Utility function for memory/string compare operation on object descriptor pointers.
IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making an access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in an unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignment should be avoided and below function used instead
int32_t tivx_obj_desc_strncmp_delim | ( | volatile void * | dst, |
volatile void * | src, | ||
uint32_t | size, | ||
char | delim | ||
) |
Utility function for memory/string compare operation on object descriptor pointers with delimiter.
The function only compares until there is a mismatch, it gets to the end of the string, or it gets to the delimiter. If the strings are the same before one of them reaches a delimiter, the result is still 0
IMPORTANT NOTE: On some SoCs, obj desc's are allocated in a memory region where unaligned access results in 'Bus Error'. The fields with a obj desc are properly aligned so making an access to obj desc fields is fine. But when APIs like strncpy, memcpy, memset are used, it could result in an unaligned access. To avoid this, below functions should be used in place of standard strncpy, memcpy, meset functions. Note, when a operation like *a_struct = *b_struct is done it results in a memcpy so this kind of structure assignment should be avoided and below function used instead