CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
User Facing Object Array API

The Public Object Array API. More...

Typedefs

typedef struct ObjectArray * vx_object_array
 The ObjectArray Object. ObjectArray is a strongly-typed container of OpenVX data-objects.
 

Enumerations

enum  vx_object_array_attribute_e {
  VX_OBJECT_ARRAY_ITEMTYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_OBJECT_ARRAY) + 0x0 ,
  VX_OBJECT_ARRAY_NUMITEMS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_OBJECT_ARRAY) + 0x1
}
 The ObjectArray object attributes. More...
 

Functions

VX_API_ENTRY vx_object_array VX_API_CALL vxCreateObjectArray (vx_context context, vx_reference exemplar, vx_size count)
 Creates a reference to an ObjectArray of count objects.
 
VX_API_ENTRY vx_object_array VX_API_CALL vxCreateVirtualObjectArray (vx_graph graph, vx_reference exemplar, vx_size count)
 Creates an opaque reference to a virtual ObjectArray with no direct user access.
 
VX_API_ENTRY vx_reference VX_API_CALL vxGetObjectArrayItem (vx_object_array arr, vx_uint32 index)
 Retrieves the reference to the OpenVX Object in location index of the ObjectArray.
 
VX_API_ENTRY vx_status VX_API_CALL vxReleaseObjectArray (vx_object_array *arr)
 Releases a reference of an ObjectArray object.
 
VX_API_ENTRY vx_status VX_API_CALL vxQueryObjectArray (vx_object_array arr, vx_enum attribute, void *ptr, vx_size size)
 Queries an atribute from the ObjectArray.
 
VX_API_ENTRY vx_object_array VX_API_CALL vxCreateObjectArrayWithType (vx_context context, vx_enum type)
 Creates a reference to an ObjectArray of a specific object type.
 
VX_API_ENTRY vx_status VX_API_CALL vxSetObjectArrayItem (vx_object_array arr, vx_uint32 index, vx_reference ref)
 Adds the reference to the OpenVX Object in location index of the ObjectArray.
 

Detailed Description

The Public Object Array API.

Typedef Documentation

◆ vx_object_array

typedef struct ObjectArray* vx_object_array

#include <vx_types.h>

The ObjectArray Object. ObjectArray is a strongly-typed container of OpenVX data-objects.

Enumeration Type Documentation

◆ vx_object_array_attribute_e

#include <vx_types.h>

The ObjectArray object attributes.

Enumerator
VX_OBJECT_ARRAY_ITEMTYPE 

The type of the ObjectArray items. Read-only. Use a vx_enum parameter.

VX_OBJECT_ARRAY_NUMITEMS 

The number of items in the ObjectArray. Read-only. Use a vx_size parameter.

Function Documentation

◆ vxCreateObjectArray()

VX_API_ENTRY vx_object_array VX_API_CALL vxCreateObjectArray ( vx_context context,
vx_reference exemplar,
vx_size count )

#include <vx_api.h>

Creates a reference to an ObjectArray of count objects.

It uses the metadata of the exemplar to determine the object attributes, ignoring the object data. It does not alter the exemplar or keep or release the reference to the exemplar. For the definition of supported attributes see vxSetMetaFormatAttribute. In case the exemplar is a virtual object it must be of immutable metadata, thus it is not allowed to be dimensionless or formatless.

Parameters
[in]contextThe reference to the overall Context.
[in]exemplarThe exemplar object that defines the metadata of the created objects in the ObjectArray.
[in]countNumber of Objects to create in the ObjectArray. This value must be greater than zero.
Returns
An ObjectArray reference vx_object_array. Any possible errors preventing a successful creation should be checked using vxGetStatus. Data objects are not initialized by this function.

◆ vxCreateObjectArrayWithType()

VX_API_ENTRY vx_object_array VX_API_CALL vxCreateObjectArrayWithType ( vx_context context,
vx_enum type )

#include <vx_corevx_ext.h>

Creates a reference to an ObjectArray of a specific object type.

It uses the enum value to determine the object attributes, No data objects are created by this function.

Parameters
[in]contextThe reference to the overall Context.
[in]typeThe enum of the object type to be contained in the ObjectArray.
Returns
An ObjectArray reference vx_object_array. Any possible errors preventing a successful creation should be checked using vxGetStatus. Data objects are not initialized by this function.

◆ vxCreateVirtualObjectArray()

VX_API_ENTRY vx_object_array VX_API_CALL vxCreateVirtualObjectArray ( vx_graph graph,
vx_reference exemplar,
vx_size count )

#include <vx_api.h>

Creates an opaque reference to a virtual ObjectArray with no direct user access.

This function creates an ObjectArray of count objects with similar behavior as vxCreateObjectArray. The only difference is that the objects that are created are virtual in the given graph.

Parameters
[in]graphReference to the graph where to create the virtual ObjectArray.
[in]exemplarThe exemplar object that defines the type of object in the ObjectArray. Only exemplar type of vx_image, vx_array and vx_pyramid are allowed.
[in]countNumber of Objects to create in the ObjectArray.
Returns
A ObjectArray reference vx_object_array. Any possible errors preventing a successful creation should be checked using vxGetStatus.

◆ vxGetObjectArrayItem()

VX_API_ENTRY vx_reference VX_API_CALL vxGetObjectArrayItem ( vx_object_array arr,
vx_uint32 index )

#include <vx_api.h>

Retrieves the reference to the OpenVX Object in location index of the ObjectArray.

This is a vx_reference, which can be used elsewhere in OpenVX. A call to vxRelease<Object> or vxReleaseReference is necessary to release the Object for each call to this function.

Parameters
[in]arrThe ObjectArray.
[in]indexThe index of the object in the ObjectArray.
Returns
A reference to an OpenVX data object. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus.

◆ vxQueryObjectArray()

VX_API_ENTRY vx_status VX_API_CALL vxQueryObjectArray ( vx_object_array arr,
vx_enum attribute,
void * ptr,
vx_size size )

#include <vx_api.h>

Queries an atribute from the ObjectArray.

Parameters
[in]arrThe reference to the ObjectArray.
[in]attributeThe attribute to query. Use a vx_object_array_attribute_e.
[out]ptrThe location at which to store the resulting value.
[in]sizeThe size in bytes of the container to which ptr points.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEarr is not a valid vx_object_array reference.
VX_ERROR_NOT_SUPPORTEDIf the attribute is not a value supported on this implementation.
VX_ERROR_INVALID_PARAMETERSIf any of the other parameters are incorrect.

◆ vxReleaseObjectArray()

VX_API_ENTRY vx_status VX_API_CALL vxReleaseObjectArray ( vx_object_array * arr)

#include <vx_api.h>

Releases a reference of an ObjectArray object.

The object may not be garbage collected until its total reference and its contained objects count is zero. After returning from this function the reference is zeroed/cleared.

Parameters
[in]arrThe pointer to the ObjectArray to release.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEarr is not a valid vx_object_array reference.

◆ vxSetObjectArrayItem()

VX_API_ENTRY vx_status VX_API_CALL vxSetObjectArrayItem ( vx_object_array arr,
vx_uint32 index,
vx_reference ref )

#include <vx_corevx_ext.h>

Adds the reference to the OpenVX Object in location index of the ObjectArray.

This is a vx_reference, which can be later fetched using vxFetObjectArrayItem anc can be used elsewhere in OpenVX.

Parameters
[in]arrThe ObjectArray.
[in]indexThe index of the object in the ObjectArray.
[in]refThe reference to the Object to be added to the ObjectArray.
Returns
vx_status VX_SUCCESS if the reference was successfully added; otherise a non-zero error code.