19 #ifndef VX_REFERENCE_H_ 20 #define VX_REFERENCE_H_ 40 typedef enum _tivx_reftype_e {
63 typedef struct _vx_reference {
vx_bool ownIsValidType(vx_enum type)
This returns true if the type is within the definition of types in OpenVX.
struct _vx_delay * vx_delay
#define VX_MAX_REFERENCE_NAME
vx_status ownReferenceUnlock(vx_reference ref)
Unlock the reference.
vx_status ownReleaseReferenceInt(vx_reference *ref, vx_enum type, vx_enum reftype, tivx_reference_callback_f destructor)
Used to destroy a reference.
void ownPrintReference(vx_reference ref)
Print reference information.
vx_status ownInitReference(vx_reference ref, vx_context context, vx_enum type, vx_reference scope)
Init a reference object.
The most basic type in the OpenVX system. Any type that inherits from tivx_reference_t must have a vx...
tivx_obj_desc_t * obj_desc
object descriptor
vx_context context
Pointer to the top level context. If this reference is the context, this will be NULL.
uint32_t magic
Magic code which confirms this is a reference.
void ownInitReferenceForDelay(vx_reference ref, vx_delay d, vx_int32 index)
Used to initialize any vx_reference as a delay element.
tivx_reftype_e
An internal enum for notating which sort of reference type we need.
vx_enum type
Set to an enum value in vx_type_e.
struct _vx_context * vx_context
vx_status ownReferenceAllocMem(vx_reference ref)
Alloc memory associated with this reference, typically data reference.
struct _vx_reference * vx_reference
vx_bool is_array_element
Indicates that the object is an element of a pyramid or object array.
tivx_mutex lock
Lock to take for the reference.
vx_bool ownIsValidReference(vx_reference ref)
Check if reference is valid.
vx_reference scope
The pointer to the object's scope parent. When virtual objects are scoped within a graph...
void ownReferenceSetScope(vx_reference ref, vx_reference scope)
Set scope of a reference.
vx_reference ownReferenceGetHandleFromObjDescId(uint16_t obj_desc_id)
Return reference given a obj desc ID This API must only be called on the host Use the ownReferenceGet...
uint64_t ownReferenceGetHostRefFromObjDescId(uint16_t obj_desc_id)
Return 64 bit reference given a obj desc ID Used to call on the remote cores.
vx_reference ownCreateReference(vx_context context, vx_enum type, vx_enum reftype, vx_reference scope)
Create a reference object.
tivx_reference_callback_f destructor_callback
Object specific function that is called to destroy an object when refernce count reaches zero...
vx_bool is_accessible
Can this reference be accessed by user application Used for virtual reference's only.
tivx_reference_release_callback_f release_callback
Object specific function that is called to release an object.
vx_size ownSizeOfEnumType(vx_enum item_type)
Get the size of the Type enum.
vx_uint32 ownIncrementReference(vx_reference ref, vx_enum reftype)
Increments the ref count.
vx_bool is_virtual
This indicates if the object is virtual or not.
vx_status ownReferenceLock(vx_reference ref)
Lock the reference.
vx_uint32 external_count
The count of the number of users with this reference. When greater than 0, this can not be freed...
vx_uint32 ownDecrementReference(vx_reference ref, vx_enum reftype)
Decrements the ref count.
vx_uint32 internal_count
The count of the number of framework references. When greater than 0, this can not be freed...
vx_status(* tivx_reference_callback_f)(vx_reference ref)
Callback type used to register different callbacks from object dervied from references.
struct _tivx_mutex_t * tivx_mutex
Typedef for a mutex.
tivx_reference_callback_f mem_alloc_callback
Object specific function that is called to allcoate object memory.
vx_status(* VX_API_CALL)(vx_reference *ref)
Callback type used to register release callbacks from object dervied from references.
vx_uint32 ownTotalReferenceCount(vx_reference ref)
Returns the total reference count of the object.
vx_bool ownIsValidSpecificReference(vx_reference ref, vx_enum type)
Used to validate everything but vx_context, vx_image.