TIOVX User Guide
vx_khr_user_data_object.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2024 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 
17 #ifndef _OPENVX_USER_DATA_OBJECT_H_
18 #define _OPENVX_USER_DATA_OBJECT_H_
19 
25 #define OPENVX_KHR_USER_DATA_OBJECT "vx_khr_user_data_object"
26 
27 #include <VX/vx.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
37 typedef struct _vx_user_data_object * vx_user_data_object;
38 
39 
43 #define VX_TYPE_USER_DATA_OBJECT 0x816
48 enum vx_user_data_object_attribute_e {
49 
57 };
58 
59 
84 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);
85 
107 VX_API_ENTRY vx_user_data_object VX_API_CALL vxCreateVirtualUserDataObject(vx_graph graph, const vx_char *type_name, vx_size size);
108 
119 VX_API_ENTRY vx_status VX_API_CALL vxReleaseUserDataObject(vx_user_data_object *user_data_object);
120 
137 VX_API_ENTRY vx_status VX_API_CALL vxQueryUserDataObject(vx_user_data_object user_data_object, vx_enum attribute, void *ptr, vx_size size);
138 
155 VX_API_ENTRY vx_status VX_API_CALL vxSetUserDataObjectAttribute(vx_user_data_object user_data_object, vx_enum attribute, const void *ptr, vx_size size);
156 
182 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);
183 
220 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);
221 
235 VX_API_ENTRY vx_status VX_API_CALL vxUnmapUserDataObject(vx_user_data_object user_data_object, vx_map_id map_id);
236 
237 #ifdef __cplusplus
238 }
239 #endif
240 
241 #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
The number of valid bytes in the user data object. Must be less than or equal to the value of VX_USER...
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.
VX_API_ENTRY vx_status VX_API_CALL vxSetUserDataObjectAttribute(vx_user_data_object user_data_object, vx_enum attribute, const void *ptr, vx_size size)
Sets an attribute in 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