TIOVX User Guide
vx_khr_user_data_object.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2018 The Khronos Group Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef _OPENVX_USER_DATA_OBJECT_H_
17 #define _OPENVX_USER_DATA_OBJECT_H_
18 
24 #define OPENVX_KHR_USER_DATA_OBJECT "vx_khr_user_data_object"
25 
26 #include <VX/vx.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
36 typedef struct _vx_user_data_object * vx_user_data_object;
37 
38 
42 #define VX_TYPE_USER_DATA_OBJECT 0x816
47 enum vx_user_data_object_attribute_e {
48 
52 };
53 
54 
79 VX_API_ENTRY vx_user_data_object VX_API_CALL vxCreateUserDataObject(vx_context context, const vx_char *type_name, vx_size size, const void *ptr);
80 
102 VX_API_ENTRY vx_user_data_object VX_API_CALL vxCreateVirtualUserDataObject(vx_graph graph, const vx_char *type_name, vx_size size);
103 
114 VX_API_ENTRY vx_status VX_API_CALL vxReleaseUserDataObject(vx_user_data_object *user_data_object);
115 
132 VX_API_ENTRY vx_status VX_API_CALL vxQueryUserDataObject(vx_user_data_object user_data_object, vx_enum attribute, void *ptr, vx_size size);
133 
159 VX_API_ENTRY vx_status VX_API_CALL vxCopyUserDataObject(vx_user_data_object user_data_object, vx_size offset, vx_size size, void *user_ptr, vx_enum usage, vx_enum user_mem_type);
160 
197 VX_API_ENTRY vx_status VX_API_CALL vxMapUserDataObject(vx_user_data_object user_data_object, vx_size offset, vx_size size, vx_map_id *map_id, void **ptr, vx_enum usage, vx_enum mem_type, vx_uint32 flags);
198 
212 VX_API_ENTRY vx_status VX_API_CALL vxUnmapUserDataObject(vx_user_data_object user_data_object, vx_map_id map_id);
213 
214 #ifdef __cplusplus
215 }
216 #endif
217 
218 #endif
VX_API_ENTRY vx_status VX_API_CALL vxQueryUserDataObject(vx_user_data_object user_data_object, vx_enum attribute, void *ptr, vx_size size)
Queries the User data object for some specific information.
VX_ID_KHRONOS
size_t vx_size
VX_API_ENTRY vx_user_data_object VX_API_CALL vxCreateVirtualUserDataObject(vx_graph graph, const vx_char *type_name, vx_size size)
Creates an opaque reference to a virtual User Data Object with no direct user access.
The number of bytes in the user data object. Read-only. Use a vx_size parameter.
int32_t vx_enum
VX_API_ENTRY vx_user_data_object VX_API_CALL vxCreateUserDataObject(vx_context context, const vx_char *type_name, vx_size size, const void *ptr)
Creates a reference to a User Data Object.
char vx_char
vx_enum vx_status
struct _vx_context * vx_context
The type name of the user data object. Read-only. Use a vx_char[VX_MAX_REFERENCE_NAME] array...
#define VX_ATTRIBUTE_BASE(vendor, object)
struct _vx_user_data_object * vx_user_data_object
The User Data Object. User Data Object is a strongly-typed container for other data structures...
#define VX_TYPE_USER_DATA_OBJECT
The object type enumeration for user data object.
VX_API_ENTRY vx_status VX_API_CALL vxMapUserDataObject(vx_user_data_object user_data_object, vx_size offset, vx_size size, vx_map_id *map_id, void **ptr, vx_enum usage, vx_enum mem_type, vx_uint32 flags)
Allows the application to get direct access to a subset of the user data object.
uint32_t vx_uint32
VX_API_ENTRY vx_status VX_API_CALL vxUnmapUserDataObject(vx_user_data_object user_data_object, vx_map_id map_id)
Unmap and commit potential changes to a user data object subset that was previously mapped...
VX_API_ENTRY vx_status VX_API_CALL vxReleaseUserDataObject(vx_user_data_object *user_data_object)
Releases a reference of a User data object. The object may not be garbage collected until its total r...
struct _vx_graph * vx_graph
VX_API_ENTRY vx_status VX_API_CALL vxCopyUserDataObject(vx_user_data_object user_data_object, vx_size offset, vx_size size, void *user_ptr, vx_enum usage, vx_enum user_mem_type)
Allows the application to copy a subset from/into a user data object.
uintptr_t vx_map_id
vx_status(* VX_API_CALL)(vx_reference *ref)
Callback type used to register release callbacks from object derived from references.
Definition: vx_reference.h:56