The Khronos Extension for OpenVX XML Import and Export Support.
More...
|
typedef struct _vx_import * | vx_import |
| An abstract handle to an import object.
|
|
|
vx_status | vxExportToXML (vx_context context, vx_char xmlfile[]) |
| Exports all objects in the context to an XML file which uses the OpenVX XML Schema.
|
|
vx_import | vxImportFromXML (vx_context context, vx_char xmlfile[]) |
| Imports all framework and data objects from an XML file into the given context.
|
|
vx_status | vxSetReferenceName (vx_reference ref, const vx_char *name) |
| Name a referenceThis function is used to associate a name to a reference. This name can be used by the OpenVX implementation in log messages and any other reporting mechanisms. It is also intended to be used by vxGetImportReferenceByName to retrieve a named reference from a vx_import object.
|
|
vx_reference | vxGetImportReferenceByName (vx_import import, const vx_char *name) |
| Used to retrieve a reference by name from the import when the name is known beforehand. If multiple references have the same name, then any one of them may be returned.
|
|
vx_reference | vxGetImportReferenceByIndex (vx_import import, vx_uint32 index) |
| Used to retrieve a reference by the index from the import.
|
|
vx_status | vxQueryImport (vx_import import, vx_enum attribute, void *ptr, vx_size size) |
| Used to query the import about its properties.
|
|
vx_status | vxReleaseImport (vx_import *import) |
| Releases a reference to an import object. Also internally releases its references to its imported objects. These imported objects may not be garbage collected until their total reference counts are zero.
|
|
vx_status | vxReleaseReference (vx_reference *ref) |
| Releases a reference. The object may not be garbage collected until its total reference count is zero.
|
|
The Khronos Extension for OpenVX XML Import and Export Support.
#define VX_MAX_REFERENCE_NAME (64) |
Extended reference attribute list. This extension adds new attributes that can be queried by the vxQueryReference
function.
- Enumerator:
VX_REF_ATTRIBUTE_NAME |
Used to query the reference for its name. Use a *vx_char parameter.
|
Definition at line 50 of file vx_khr_xml.h.
The Object Type Enumeration for Imports.
- Enumerator:
-
Definition at line 58 of file vx_khr_xml.h.
The import attributes list.
- See Also
- vxQueryImport
- Enumerator:
VX_IMPORT_ATTRIBUTE_COUNT |
Returns the number of references in the import object. Use a vx_uint32 parameter.
|
VX_IMPORT_ATTRIBUTE_TYPE |
Returns the type of import. Use a vx_ext_import_types_e parameter.
|
Definition at line 74 of file vx_khr_xml.h.
vx_status vxExportToXML |
( |
vx_context |
context, |
|
|
vx_char |
xmlfile[] |
|
) |
| |
Exports all objects in the context to an XML file which uses the OpenVX XML Schema.
- Parameters
-
[in] | context | The context to export. |
[in] | xmlfile | The file name to write the XML into. |
- Note
- The reference numbers contained in the xml file can appear in any order but should be inclusive from index number 0 to [number of references - 1]. For example, if there are 20 references in the xml file, none of the reference indices should be >= 20.
- Returns
- A
vx_status_e
enumeration.
- See Also
- https://www.khronos.org/registry/vx/schema/openvx-1-0.xsd
vx_import vxImportFromXML |
( |
vx_context |
context, |
|
|
vx_char |
xmlfile[] |
|
) |
| |
Imports all framework and data objects from an XML file into the given context.
- Parameters
-
[in] | context | The context to import into. |
[in] | xmlfile | The XML file to read. |
- Note
- The reference indices in the import object corresponds with the reference numbers in the XML file. It is assumed that the program has some means to know which references to use from imported list (either by name:
vxGetImportReferenceByName
, or by index from looking at the XML file (debug use case): vxGetImportReferenceByIndex
). Alternativly, the program can use vxGetImportReferenceByIndex
in a loop and query each one to understand what was imported. After all references of interest have been retrieved, this import obects should be released using vxReleaseImport
.
- Returns
- vx_import object containing references to the imported objects in the context
- See Also
- https://www.khronos.org/registry/vx/schema/openvx-1-0.xsd
vx_status vxSetReferenceName |
( |
vx_reference |
ref, |
|
|
const vx_char * |
name |
|
) |
| |
Name a referenceThis function is used to associate a name to a reference. This name can be used by the OpenVX implementation in log messages and any other reporting mechanisms. It is also intended to be used by vxGetImportReferenceByName
to retrieve a named reference from a vx_import object.
The OpenVX implementation will not check if the name is unique in the reference scope (context or graph). Several references can then have the same name.
- Parameters
-
[in] | ref | The reference to name. |
[in] | name | Pointer to the '\0' terminated string that identifies the reference. The string is copied by the function so that it stays the property of the caller. NULL means that the reference is not named. |
- Returns
- A vx_status_e enumeration.
- Return values
-
VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | if reference is not valid. |
vx_reference vxGetImportReferenceByName |
( |
vx_import |
import, |
|
|
const vx_char * |
name |
|
) |
| |
Used to retrieve a reference by name from the import when the name is known beforehand. If multiple references have the same name, then any one of them may be returned.
- Parameters
-
[in] | import | The reference to the import object. |
[in] | name | The reference string name. |
- Returns
vx_reference
- Return values
-
0 | Invalid import object or name does not match a reference in the import object. |
* | The reference matching the requested name. |
- Note
- Use
vxReleaseReference
to release the reference before releasing the context.
- Precondition
vxImportFromXML
vx_reference vxGetImportReferenceByIndex |
( |
vx_import |
import, |
|
|
vx_uint32 |
index |
|
) |
| |
Used to retrieve a reference by the index from the import.
- Parameters
-
[in] | import | The reference to the import object. |
[in] | index | The index of the reference in the import object to return. |
- Returns
vx_reference
- Return values
-
0 | Invalid import object or index. |
* | The reference at the requested index number. |
- Note
- Use
vxQueryImport
with VX_IMPORT_ATTRIBUTE_COUNT
to retrieve the upper limit of references in the import.
-
Use
vxReleaseReference
to release the reference before releasing the context.
- Precondition
vxImportFromXML
vx_status vxQueryImport |
( |
vx_import |
import, |
|
|
vx_enum |
attribute, |
|
|
void * |
ptr, |
|
|
vx_size |
size |
|
) |
| |
Used to query the import about its properties.
- Parameters
-
[in] | import | The reference to the import object. |
[in] | attribute | The vx_import_attribute_e value to query for. |
[out] | ptr | The location at which the resulting value will be stored. |
[in] | size | The size of the container to which ptr points. |
- Returns
- A
vx_status_e
enumeration.
- Precondition
vxImportFromXML
vx_status vxReleaseImport |
( |
vx_import * |
import | ) |
|
Releases a reference to an import object. Also internally releases its references to its imported objects. These imported objects may not be garbage collected until their total reference counts are zero.
- Parameters
-
[in] | import | The pointer to the import object to release. |
- Returns
- A
vx_status_e
enumeration.
- Return values
-
VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If import is not a vx_import . |
- Note
- After returning from this function the reference will be zeroed.
- Precondition
vxImportFromXML
vx_status vxReleaseReference |
( |
vx_reference * |
ref | ) |
|
Releases a reference. The object may not be garbage collected until its total reference count is zero.
- Parameters
-
[in] | ref | The pointer to the reference to release. |
- Returns
- A
vx_status_e
enumeration.
- Return values
-
VX_SUCCESS | No errors. |
VX_ERROR_INVALID_REFERENCE | If reference is not a vx_reference . |
- Note
- After returning from this function the reference will be zeroed.
- Precondition
vxGetImportReferenceByName
or vxGetImportReferenceByIndex