Skip to content

Commit d55ba83

Browse files
authored
generate functions from the latest XML file (#12)
1 parent 040f601 commit d55ba83

File tree

2 files changed

+139
-35
lines changed

2 files changed

+139
-35
lines changed

src/openclext.cpp

Lines changed: 130 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,34 @@ typedef cl_int (CL_API_CALL* clEnqueueReleaseDX9ObjectsINTEL_clextfn)(
924924
#endif // defined(cl_intel_dx9_media_sharing)
925925
#endif // defined(CLEXT_INCLUDE_DX9)
926926

927+
#if defined(cl_intel_program_scope_host_pipe)
928+
929+
typedef cl_int (CL_API_CALL* clEnqueueReadHostPipeINTEL_clextfn)(
930+
cl_command_queue command_queue,
931+
cl_program program,
932+
const char* pipe_symbol,
933+
cl_bool blocking_read,
934+
void* ptr,
935+
size_t size,
936+
cl_uint num_events_in_wait_list,
937+
const cl_event* event_wait_list,
938+
cl_event* event);
939+
940+
typedef cl_int (CL_API_CALL* clEnqueueWriteHostPipeINTEL_clextfn)(
941+
cl_command_queue command_queue,
942+
cl_program program,
943+
const char* pipe_symbol,
944+
cl_bool blocking_write,
945+
const void* ptr,
946+
size_t size,
947+
cl_uint num_events_in_wait_list,
948+
const cl_event* event_wait_list,
949+
cl_event* event);
950+
951+
#else
952+
#pragma message("Define for cl_intel_program_scope_host_pipe was not found! Please update your headers.")
953+
#endif // defined(cl_intel_program_scope_host_pipe)
954+
927955
#if defined(CLEXT_INCLUDE_D3D10)
928956
#if defined(cl_intel_sharing_format_query_d3d10)
929957

@@ -1053,15 +1081,6 @@ typedef cl_int (CL_API_CALL* clSetKernelArgMemPointerINTEL_clextfn)(
10531081
cl_uint arg_index,
10541082
const void* arg_value);
10551083

1056-
typedef cl_int (CL_API_CALL* clEnqueueMemsetINTEL_clextfn)(
1057-
cl_command_queue command_queue,
1058-
void* dst_ptr,
1059-
cl_int value,
1060-
size_t size,
1061-
cl_uint num_events_in_wait_list,
1062-
const cl_event* event_wait_list,
1063-
cl_event* event);
1064-
10651084
typedef cl_int (CL_API_CALL* clEnqueueMemFillINTEL_clextfn)(
10661085
cl_command_queue command_queue,
10671086
void* dst_ptr,
@@ -1104,6 +1123,15 @@ typedef cl_int (CL_API_CALL* clEnqueueMigrateMemINTEL_clextfn)(
11041123

11051124
#endif // defined(CL_VERSION_1_2)
11061125

1126+
typedef cl_int (CL_API_CALL* clEnqueueMemsetINTEL_clextfn)(
1127+
cl_command_queue command_queue,
1128+
void* dst_ptr,
1129+
cl_int value,
1130+
size_t size,
1131+
cl_uint num_events_in_wait_list,
1132+
const cl_event* event_wait_list,
1133+
cl_event* event);
1134+
11071135
#else
11081136
#pragma message("Define for cl_intel_unified_shared_memory was not found! Please update your headers.")
11091137
#endif // defined(cl_intel_unified_shared_memory)
@@ -1348,6 +1376,11 @@ struct openclext_dispatch_table {
13481376
#endif // defined(cl_intel_dx9_media_sharing)
13491377
#endif // defined(CLEXT_INCLUDE_DX9)
13501378

1379+
#if defined(cl_intel_program_scope_host_pipe)
1380+
clEnqueueReadHostPipeINTEL_clextfn clEnqueueReadHostPipeINTEL;
1381+
clEnqueueWriteHostPipeINTEL_clextfn clEnqueueWriteHostPipeINTEL;
1382+
#endif // defined(cl_intel_program_scope_host_pipe)
1383+
13511384
#if defined(CLEXT_INCLUDE_D3D10)
13521385
#if defined(cl_intel_sharing_format_query_d3d10)
13531386
clGetSupportedD3D10TextureFormatsINTEL_clextfn clGetSupportedD3D10TextureFormatsINTEL;
@@ -1386,13 +1419,13 @@ struct openclext_dispatch_table {
13861419
clMemBlockingFreeINTEL_clextfn clMemBlockingFreeINTEL;
13871420
clGetMemAllocInfoINTEL_clextfn clGetMemAllocInfoINTEL;
13881421
clSetKernelArgMemPointerINTEL_clextfn clSetKernelArgMemPointerINTEL;
1389-
clEnqueueMemsetINTEL_clextfn clEnqueueMemsetINTEL;
13901422
clEnqueueMemFillINTEL_clextfn clEnqueueMemFillINTEL;
13911423
clEnqueueMemcpyINTEL_clextfn clEnqueueMemcpyINTEL;
13921424
clEnqueueMemAdviseINTEL_clextfn clEnqueueMemAdviseINTEL;
13931425
#if defined(CL_VERSION_1_2)
13941426
clEnqueueMigrateMemINTEL_clextfn clEnqueueMigrateMemINTEL;
13951427
#endif // defined(CL_VERSION_1_2)
1428+
clEnqueueMemsetINTEL_clextfn clEnqueueMemsetINTEL;
13961429
#endif // defined(cl_intel_unified_shared_memory)
13971430

13981431
#if defined(CLEXT_INCLUDE_VA_API)
@@ -1593,6 +1626,11 @@ static void _init(cl_platform_id platform, openclext_dispatch_table* dispatch_pt
15931626
#endif // defined(cl_intel_dx9_media_sharing)
15941627
#endif // defined(CLEXT_INCLUDE_DX9)
15951628

1629+
#if defined(cl_intel_program_scope_host_pipe)
1630+
CLEXT_GET_EXTENSION(clEnqueueReadHostPipeINTEL);
1631+
CLEXT_GET_EXTENSION(clEnqueueWriteHostPipeINTEL);
1632+
#endif // defined(cl_intel_program_scope_host_pipe)
1633+
15961634
#if defined(CLEXT_INCLUDE_D3D10)
15971635
#if defined(cl_intel_sharing_format_query_d3d10)
15981636
CLEXT_GET_EXTENSION(clGetSupportedD3D10TextureFormatsINTEL);
@@ -1631,13 +1669,13 @@ static void _init(cl_platform_id platform, openclext_dispatch_table* dispatch_pt
16311669
CLEXT_GET_EXTENSION(clMemBlockingFreeINTEL);
16321670
CLEXT_GET_EXTENSION(clGetMemAllocInfoINTEL);
16331671
CLEXT_GET_EXTENSION(clSetKernelArgMemPointerINTEL);
1634-
CLEXT_GET_EXTENSION(clEnqueueMemsetINTEL);
16351672
CLEXT_GET_EXTENSION(clEnqueueMemFillINTEL);
16361673
CLEXT_GET_EXTENSION(clEnqueueMemcpyINTEL);
16371674
CLEXT_GET_EXTENSION(clEnqueueMemAdviseINTEL);
16381675
#if defined(CL_VERSION_1_2)
16391676
CLEXT_GET_EXTENSION(clEnqueueMigrateMemINTEL);
16401677
#endif // defined(CL_VERSION_1_2)
1678+
CLEXT_GET_EXTENSION(clEnqueueMemsetINTEL);
16411679
#endif // defined(cl_intel_unified_shared_memory)
16421680

16431681
#if defined(CLEXT_INCLUDE_VA_API)
@@ -3553,6 +3591,64 @@ cl_int CL_API_CALL clEnqueueReleaseDX9ObjectsINTEL(
35533591
#endif // defined(CLEXT_INCLUDE_DX9)
35543592

35553593

3594+
#if defined(cl_intel_program_scope_host_pipe)
3595+
3596+
cl_int CL_API_CALL clEnqueueReadHostPipeINTEL(
3597+
cl_command_queue command_queue,
3598+
cl_program program,
3599+
const char* pipe_symbol,
3600+
cl_bool blocking_read,
3601+
void* ptr,
3602+
size_t size,
3603+
cl_uint num_events_in_wait_list,
3604+
const cl_event* event_wait_list,
3605+
cl_event* event)
3606+
{
3607+
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(command_queue);
3608+
if (dispatch_ptr == NULL || dispatch_ptr->clEnqueueReadHostPipeINTEL == NULL) {
3609+
return CL_INVALID_OPERATION;
3610+
}
3611+
return dispatch_ptr->clEnqueueReadHostPipeINTEL(
3612+
command_queue,
3613+
program,
3614+
pipe_symbol,
3615+
blocking_read,
3616+
ptr,
3617+
size,
3618+
num_events_in_wait_list,
3619+
event_wait_list,
3620+
event);
3621+
}
3622+
3623+
cl_int CL_API_CALL clEnqueueWriteHostPipeINTEL(
3624+
cl_command_queue command_queue,
3625+
cl_program program,
3626+
const char* pipe_symbol,
3627+
cl_bool blocking_write,
3628+
const void* ptr,
3629+
size_t size,
3630+
cl_uint num_events_in_wait_list,
3631+
const cl_event* event_wait_list,
3632+
cl_event* event)
3633+
{
3634+
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(command_queue);
3635+
if (dispatch_ptr == NULL || dispatch_ptr->clEnqueueWriteHostPipeINTEL == NULL) {
3636+
return CL_INVALID_OPERATION;
3637+
}
3638+
return dispatch_ptr->clEnqueueWriteHostPipeINTEL(
3639+
command_queue,
3640+
program,
3641+
pipe_symbol,
3642+
blocking_write,
3643+
ptr,
3644+
size,
3645+
num_events_in_wait_list,
3646+
event_wait_list,
3647+
event);
3648+
}
3649+
3650+
#endif // defined(cl_intel_program_scope_host_pipe)
3651+
35563652
#if defined(CLEXT_INCLUDE_D3D10)
35573653
#if defined(cl_intel_sharing_format_query_d3d10)
35583654

@@ -3827,29 +3923,6 @@ cl_int CL_API_CALL clSetKernelArgMemPointerINTEL(
38273923
arg_value);
38283924
}
38293925

3830-
cl_int CL_API_CALL clEnqueueMemsetINTEL(
3831-
cl_command_queue command_queue,
3832-
void* dst_ptr,
3833-
cl_int value,
3834-
size_t size,
3835-
cl_uint num_events_in_wait_list,
3836-
const cl_event* event_wait_list,
3837-
cl_event* event)
3838-
{
3839-
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(command_queue);
3840-
if (dispatch_ptr == NULL || dispatch_ptr->clEnqueueMemsetINTEL == NULL) {
3841-
return CL_INVALID_OPERATION;
3842-
}
3843-
return dispatch_ptr->clEnqueueMemsetINTEL(
3844-
command_queue,
3845-
dst_ptr,
3846-
value,
3847-
size,
3848-
num_events_in_wait_list,
3849-
event_wait_list,
3850-
event);
3851-
}
3852-
38533926
cl_int CL_API_CALL clEnqueueMemFillINTEL(
38543927
cl_command_queue command_queue,
38553928
void* dst_ptr,
@@ -3950,6 +4023,29 @@ cl_int CL_API_CALL clEnqueueMigrateMemINTEL(
39504023

39514024
#endif // defined(CL_VERSION_1_2)
39524025

4026+
cl_int CL_API_CALL clEnqueueMemsetINTEL(
4027+
cl_command_queue command_queue,
4028+
void* dst_ptr,
4029+
cl_int value,
4030+
size_t size,
4031+
cl_uint num_events_in_wait_list,
4032+
const cl_event* event_wait_list,
4033+
cl_event* event)
4034+
{
4035+
struct openclext_dispatch_table* dispatch_ptr = _get_dispatch(command_queue);
4036+
if (dispatch_ptr == NULL || dispatch_ptr->clEnqueueMemsetINTEL == NULL) {
4037+
return CL_INVALID_OPERATION;
4038+
}
4039+
return dispatch_ptr->clEnqueueMemsetINTEL(
4040+
command_queue,
4041+
dst_ptr,
4042+
value,
4043+
size,
4044+
num_events_in_wait_list,
4045+
event_wait_list,
4046+
event);
4047+
}
4048+
39534049
#endif // defined(cl_intel_unified_shared_memory)
39544050

39554051
#if defined(CLEXT_INCLUDE_VA_API)

tests/call_all.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ void call_all(void)
185185
clEnqueueReleaseDX9ObjectsINTEL(NULL, 0, NULL, 0, NULL, NULL);
186186
#endif // cl_intel_dx9_media_sharing
187187

188+
#ifdef cl_intel_program_scope_host_pipe
189+
clEnqueueReadHostPipeINTEL(NULL, NULL, NULL, CL_FALSE, NULL, 0, 0, NULL, NULL);
190+
clEnqueueWriteHostPipeINTEL(NULL, NULL, NULL, CL_FALSE, NULL, 0, 0, NULL, NULL);
191+
#endif // cl_intel_program_scope_host_pipe
192+
188193
#ifdef cl_intel_sharing_format_query_d3d10
189194
clGetSupportedD3D10TextureFormatsINTEL(NULL, CL_MEM_READ_WRITE, CL_MEM_OBJECT_IMAGE2D, 0, NULL, NULL);
190195
#endif // cl_intel_sharing_format_query_d3d10
@@ -213,7 +218,6 @@ void call_all(void)
213218
clMemBlockingFreeINTEL(NULL, NULL);
214219
clGetMemAllocInfoINTEL(NULL, NULL, CL_MEM_ALLOC_TYPE_INTEL, 0, NULL, NULL);
215220
clSetKernelArgMemPointerINTEL(NULL, 0, NULL);
216-
clEnqueueMemsetINTEL(NULL, NULL, 0, 0, 0, NULL, NULL);
217221
clEnqueueMemFillINTEL(NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
218222
clEnqueueMemcpyINTEL(NULL, CL_FALSE, NULL, NULL, 0, 0, NULL, NULL);
219223
clEnqueueMemAdviseINTEL(NULL, NULL, 0, 0, 0, NULL, NULL);
@@ -225,6 +229,10 @@ void call_all(void)
225229
#endif // defined(CL_VERSION_1_2)
226230
#endif // cl_intel_unified_shared_memory
227231

232+
#ifdef cl_intel_unified_shared_memory
233+
clEnqueueMemsetINTEL(NULL, NULL, 0, 0, 0, NULL, NULL);
234+
#endif // cl_intel_unified_shared_memory
235+
228236
#ifdef cl_intel_va_api_media_sharing
229237
clGetDeviceIDsFromVA_APIMediaAdapterINTEL(NULL, CL_VA_API_DISPLAY_INTEL, NULL, CL_ALL_DEVICES_FOR_VA_API_INTEL, 0, NULL, NULL);
230238
clCreateFromVA_APIMediaSurfaceINTEL(NULL, CL_MEM_READ_WRITE, NULL, 0, NULL);

0 commit comments

Comments
 (0)