Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
37c40316
Commit
37c40316
authored
Nov 23, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opencl: Convert the Unix library to the __wine_unix_call interface.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f91c0097
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1543 additions
and
438 deletions
+1543
-438
Makefile.in
dlls/opencl/Makefile.in
+1
-0
make_opencl
dlls/opencl/make_opencl
+68
-14
opencl_private.h
dlls/opencl/opencl_private.h
+5
-1
pe_thunks.c
dlls/opencl/pe_thunks.c
+202
-84
pe_wrappers.c
dlls/opencl/pe_wrappers.c
+19
-8
unix_private.h
dlls/opencl/unix_private.h
+9
-40
unix_thunks.c
dlls/opencl/unix_thunks.c
+324
-156
unix_wrappers.c
dlls/opencl/unix_wrappers.c
+28
-44
unixlib.h
dlls/opencl/unixlib.h
+887
-91
No files found.
dlls/opencl/Makefile.in
View file @
37c40316
MODULE
=
opencl.dll
UNIXLIB
=
opencl.so
EXTRALIBS
=
$(OPENCL_LIBS)
C_SRCS
=
\
...
...
dlls/opencl/make_opencl
View file @
37c40316
...
...
@@ -83,6 +83,8 @@ sub generate_pe_thunk($$)
my
$trace_arg
=
""
;
my
$ret
=
get_func_proto
(
"%s WINAPI %s(%s)"
,
$name
,
$func_ref
);
my
$proto
=
$func_ref
->
[
0
]
->
textContent
();
$proto
=~
s/ +$//
;
foreach
my
$arg
(
@
{
$func_ref
->
[
1
]})
{
my
$ptype
=
get_arg_type
(
$arg
);
...
...
@@ -109,10 +111,26 @@ sub generate_pe_thunk($$)
$call_arg
=~
s/,$/ /
;
$trace_arg
=~
s/^, //
;
$ret
.=
"\n{\n"
;
$ret
.=
" TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n"
if
$gen_traces
;
$ret
.=
" "
;
$ret
.=
"return "
unless
is_void_func
(
$func_ref
);
$ret
.=
"opencl_funcs->p$name($call_arg);\n"
;
if
(
is_void_func
(
$func_ref
))
{
$ret
.=
" struct ${name}_params params = {$call_arg};\n"
;
$ret
.=
" TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n"
if
$gen_traces
;
$ret
.=
" OPENCL_CALL( $name, ¶ms );\n"
}
elsif
(
$proto
eq
"cl_int"
)
{
$ret
.=
" struct ${name}_params params = {$call_arg};\n"
;
$ret
.=
" TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n"
if
$gen_traces
;
$ret
.=
" return OPENCL_CALL( $name, ¶ms );\n"
;
}
else
{
$ret
.=
" $proto __retval;\n"
;
$ret
.=
" struct ${name}_params params = { &__retval,$call_arg};\n"
;
$ret
.=
" TRACE( \"($trace_arg)\\n\"$trace_call_arg );\n"
if
$gen_traces
;
$ret
.=
" OPENCL_CALL( $name, ¶ms );\n"
;
$ret
.=
" return __retval;\n"
;
}
$ret
.=
"}\n"
;
return
$ret
;
}
...
...
@@ -122,19 +140,33 @@ sub generate_unix_thunk($$)
my
(
$name
,
$func_ref
)
=
@_
;
my
$call_arg
=
""
;
my
$ret
=
get_func_proto
(
"static %s WINAPI wrap_%s(%s)"
,
$name
,
$func_ref
);
my
$ret
=
"static NTSTATUS wrap_$name( void *args )\n"
;
my
$proto
=
$func_ref
->
[
0
]
->
textContent
();
$proto
=~
s/ +$//
;
foreach
my
$arg
(
@
{
$func_ref
->
[
1
]})
{
my
$ptype
=
get_arg_type
(
$arg
);
next
unless
$arg
->
findnodes
(
"./name"
);
my
$pname
=
get_arg_name
(
$arg
);
my
$param
=
$arg
->
textContent
();
$call_arg
.=
" "
.
$pname
.
","
;
$call_arg
.=
"
params->
"
.
$pname
.
","
;
}
$call_arg
=~
s/,$/ /
;
$ret
.=
"\n{\n "
;
$ret
.=
"return "
unless
is_void_func
(
$func_ref
);
$ret
.=
"$name($call_arg);\n"
;
$ret
.=
"{\n"
;
$ret
.=
" struct ${name}_params *params = args;\n\n"
if
$call_arg
;
if
(
is_void_func
(
$func_ref
))
{
$ret
.=
" $name($call_arg);\n"
;
}
elsif
(
$proto
eq
"cl_int"
)
{
$ret
.=
" return $name($call_arg);\n"
;
}
else
{
$ret
.=
" *params->__retval = $name($call_arg);\n"
;
$ret
.=
" return STATUS_SUCCESS;\n"
;
}
$ret
.=
"}\n"
;
return
$ret
;
}
...
...
@@ -178,6 +210,24 @@ sub get_func_proto($$$)
return
sprintf
$format
,
$proto
,
$name
,
$args
;
}
sub
get_func_params
($$)
{
my
(
$name
,
$func
)
=
@_
;
die
"unknown func $name"
unless
defined
$func
->
[
0
];
my
$proto
=
$func
->
[
0
]
->
textContent
();
$proto
=~
s/ +$//
;
my
$params
=
"struct ${name}_params\n{\n"
;
$params
.=
" $proto* __retval;\n"
unless
$proto
eq
"cl_int"
;
foreach
my
$arg
(
@
{
$func
->
[
1
]})
{
next
unless
$arg
->
findnodes
(
"./name"
);
(
my
$argtext
=
$arg
->
textContent
())
=~
s/ +/ /g
;
$argtext
=~
s/CL_CALLBACK/WINAPI/g
;
$params
.=
" $argtext;\n"
;
}
return
$params
.
"};\n"
;
}
# extract and check the number of arguments
if
(
@ARGV
>
1
)
{
...
...
@@ -480,7 +530,7 @@ foreach (sort keys %core_functions)
print
UNIX
"\n"
,
generate_unix_thunk
(
$_
,
$core_functions
{
$_
}
);
}
print
UNIX
"\nconst
struct opencl_funcs funcs
=\n{\n"
;
print
UNIX
"\nconst
unixlib_entry_t __wine_unix_call_funcs[]
=\n{\n"
;
foreach
(
sort
keys
%
core_functions
)
{
next
unless
needs_unix_function
(
$_
);
...
...
@@ -495,15 +545,19 @@ open(UNIXHEADER, ">$unixheader_file") or die "cannot create $unixheader_file";
print
UNIXHEADER
"/* Automatically generated from OpenCL registry files; DO NOT EDIT! */\n\n"
;
print
UNIXHEADER
"struct opencl_funcs\n{\n"
;
foreach
(
sort
keys
%
core_functions
)
{
next
unless
needs_unix_function
(
$_
);
print
UNIXHEADER
get_func_p
roto
(
" %s (WINAPI *p%s)(%s);\n"
,
$_
,
$core_functions
{
$_
}
)
;
print
UNIXHEADER
get_func_p
arams
(
$_
,
$core_functions
{
$_
}
),
"\n"
;
}
print
UNIXHEADER
"};\n\n"
;
print
UNIXHEADER
"extern const struct opencl_funcs *opencl_funcs;\n"
;
print
UNIXHEADER
"enum opencl_funcs\n{\n"
;
foreach
(
sort
keys
%
core_functions
)
{
next
unless
needs_unix_function
(
$_
);
print
UNIXHEADER
" unix_$_,\n"
;
}
print
UNIXHEADER
"};\n"
;
close
(
UNIXHEADER
);
...
...
dlls/opencl/opencl_private.h
View file @
37c40316
...
...
@@ -28,9 +28,13 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/unixlib.h"
#include "wine/debug.h"
BOOL
extension_is_supported
(
const
char
*
name
,
size_t
len
)
DECLSPEC_HIDDEN
;
extern
unixlib_handle_t
opencl_handle
DECLSPEC_HIDDEN
;
#define OPENCL_CALL( func, params ) __wine_unix_call( opencl_handle, unix_ ## func, params )
#endif
dlls/opencl/pe_thunks.c
View file @
37c40316
...
...
@@ -8,506 +8,624 @@ WINE_DEFAULT_DEBUG_CHANNEL(opencl);
cl_int
WINAPI
clBuildProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
{
struct
clBuildProgram_params
params
=
{
program
,
num_devices
,
device_list
,
options
,
pfn_notify
,
user_data
};
TRACE
(
"(%p, %u, %p, %p, %p, %p)
\n
"
,
program
,
num_devices
,
device_list
,
options
,
pfn_notify
,
user_data
);
return
opencl_funcs
->
pclBuildProgram
(
program
,
num_devices
,
device_list
,
options
,
pfn_notify
,
user_data
);
return
OPENCL_CALL
(
clBuildProgram
,
&
params
);
}
cl_int
WINAPI
clCompileProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_headers
,
const
cl_program
*
input_headers
,
const
char
**
header_include_names
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
{
struct
clCompileProgram_params
params
=
{
program
,
num_devices
,
device_list
,
options
,
num_input_headers
,
input_headers
,
header_include_names
,
pfn_notify
,
user_data
};
TRACE
(
"(%p, %u, %p, %p, %u, %p, %p, %p, %p)
\n
"
,
program
,
num_devices
,
device_list
,
options
,
num_input_headers
,
input_headers
,
header_include_names
,
pfn_notify
,
user_data
);
return
opencl_funcs
->
pclCompileProgram
(
program
,
num_devices
,
device_list
,
options
,
num_input_headers
,
input_headers
,
header_include_names
,
pfn_notify
,
user_data
);
return
OPENCL_CALL
(
clCompileProgram
,
&
params
);
}
cl_mem
WINAPI
clCreateBuffer
(
cl_context
context
,
cl_mem_flags
flags
,
size_t
size
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
{
cl_mem
__retval
;
struct
clCreateBuffer_params
params
=
{
&
__retval
,
context
,
flags
,
size
,
host_ptr
,
errcode_ret
};
TRACE
(
"(%p, %s, %Iu, %p, %p)
\n
"
,
context
,
wine_dbgstr_longlong
(
flags
),
size
,
host_ptr
,
errcode_ret
);
return
opencl_funcs
->
pclCreateBuffer
(
context
,
flags
,
size
,
host_ptr
,
errcode_ret
);
OPENCL_CALL
(
clCreateBuffer
,
&
params
);
return
__retval
;
}
cl_command_queue
WINAPI
clCreateCommandQueue
(
cl_context
context
,
cl_device_id
device
,
cl_command_queue_properties
properties
,
cl_int
*
errcode_ret
)
{
cl_command_queue
__retval
;
struct
clCreateCommandQueue_params
params
=
{
&
__retval
,
context
,
device
,
properties
,
errcode_ret
};
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
context
,
device
,
wine_dbgstr_longlong
(
properties
),
errcode_ret
);
return
opencl_funcs
->
pclCreateCommandQueue
(
context
,
device
,
properties
,
errcode_ret
);
OPENCL_CALL
(
clCreateCommandQueue
,
&
params
);
return
__retval
;
}
cl_context
WINAPI
clCreateContext
(
const
cl_context_properties
*
properties
,
cl_uint
num_devices
,
const
cl_device_id
*
devices
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
{
cl_context
__retval
;
struct
clCreateContext_params
params
=
{
&
__retval
,
properties
,
num_devices
,
devices
,
pfn_notify
,
user_data
,
errcode_ret
};
TRACE
(
"(%p, %u, %p, %p, %p, %p)
\n
"
,
properties
,
num_devices
,
devices
,
pfn_notify
,
user_data
,
errcode_ret
);
return
opencl_funcs
->
pclCreateContext
(
properties
,
num_devices
,
devices
,
pfn_notify
,
user_data
,
errcode_ret
);
OPENCL_CALL
(
clCreateContext
,
&
params
);
return
__retval
;
}
cl_context
WINAPI
clCreateContextFromType
(
const
cl_context_properties
*
properties
,
cl_device_type
device_type
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
{
cl_context
__retval
;
struct
clCreateContextFromType_params
params
=
{
&
__retval
,
properties
,
device_type
,
pfn_notify
,
user_data
,
errcode_ret
};
TRACE
(
"(%p, %s, %p, %p, %p)
\n
"
,
properties
,
wine_dbgstr_longlong
(
device_type
),
pfn_notify
,
user_data
,
errcode_ret
);
return
opencl_funcs
->
pclCreateContextFromType
(
properties
,
device_type
,
pfn_notify
,
user_data
,
errcode_ret
);
OPENCL_CALL
(
clCreateContextFromType
,
&
params
);
return
__retval
;
}
cl_mem
WINAPI
clCreateImage
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
const
cl_image_desc
*
image_desc
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
{
cl_mem
__retval
;
struct
clCreateImage_params
params
=
{
&
__retval
,
context
,
flags
,
image_format
,
image_desc
,
host_ptr
,
errcode_ret
};
TRACE
(
"(%p, %s, %p, %p, %p, %p)
\n
"
,
context
,
wine_dbgstr_longlong
(
flags
),
image_format
,
image_desc
,
host_ptr
,
errcode_ret
);
return
opencl_funcs
->
pclCreateImage
(
context
,
flags
,
image_format
,
image_desc
,
host_ptr
,
errcode_ret
);
OPENCL_CALL
(
clCreateImage
,
&
params
);
return
__retval
;
}
cl_mem
WINAPI
clCreateImage2D
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_row_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
{
cl_mem
__retval
;
struct
clCreateImage2D_params
params
=
{
&
__retval
,
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_row_pitch
,
host_ptr
,
errcode_ret
};
TRACE
(
"(%p, %s, %p, %Iu, %Iu, %Iu, %p, %p)
\n
"
,
context
,
wine_dbgstr_longlong
(
flags
),
image_format
,
image_width
,
image_height
,
image_row_pitch
,
host_ptr
,
errcode_ret
);
return
opencl_funcs
->
pclCreateImage2D
(
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_row_pitch
,
host_ptr
,
errcode_ret
);
OPENCL_CALL
(
clCreateImage2D
,
&
params
);
return
__retval
;
}
cl_mem
WINAPI
clCreateImage3D
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_depth
,
size_t
image_row_pitch
,
size_t
image_slice_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
{
cl_mem
__retval
;
struct
clCreateImage3D_params
params
=
{
&
__retval
,
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_depth
,
image_row_pitch
,
image_slice_pitch
,
host_ptr
,
errcode_ret
};
TRACE
(
"(%p, %s, %p, %Iu, %Iu, %Iu, %Iu, %Iu, %p, %p)
\n
"
,
context
,
wine_dbgstr_longlong
(
flags
),
image_format
,
image_width
,
image_height
,
image_depth
,
image_row_pitch
,
image_slice_pitch
,
host_ptr
,
errcode_ret
);
return
opencl_funcs
->
pclCreateImage3D
(
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_depth
,
image_row_pitch
,
image_slice_pitch
,
host_ptr
,
errcode_ret
);
OPENCL_CALL
(
clCreateImage3D
,
&
params
);
return
__retval
;
}
cl_kernel
WINAPI
clCreateKernel
(
cl_program
program
,
const
char
*
kernel_name
,
cl_int
*
errcode_ret
)
{
cl_kernel
__retval
;
struct
clCreateKernel_params
params
=
{
&
__retval
,
program
,
kernel_name
,
errcode_ret
};
TRACE
(
"(%p, %p, %p)
\n
"
,
program
,
kernel_name
,
errcode_ret
);
return
opencl_funcs
->
pclCreateKernel
(
program
,
kernel_name
,
errcode_ret
);
OPENCL_CALL
(
clCreateKernel
,
&
params
);
return
__retval
;
}
cl_int
WINAPI
clCreateKernelsInProgram
(
cl_program
program
,
cl_uint
num_kernels
,
cl_kernel
*
kernels
,
cl_uint
*
num_kernels_ret
)
{
struct
clCreateKernelsInProgram_params
params
=
{
program
,
num_kernels
,
kernels
,
num_kernels_ret
};
TRACE
(
"(%p, %u, %p, %p)
\n
"
,
program
,
num_kernels
,
kernels
,
num_kernels_ret
);
return
opencl_funcs
->
pclCreateKernelsInProgram
(
program
,
num_kernels
,
kernels
,
num_kernels_ret
);
return
OPENCL_CALL
(
clCreateKernelsInProgram
,
&
params
);
}
cl_program
WINAPI
clCreateProgramWithBinary
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
size_t
*
lengths
,
const
unsigned
char
**
binaries
,
cl_int
*
binary_status
,
cl_int
*
errcode_ret
)
{
cl_program
__retval
;
struct
clCreateProgramWithBinary_params
params
=
{
&
__retval
,
context
,
num_devices
,
device_list
,
lengths
,
binaries
,
binary_status
,
errcode_ret
};
TRACE
(
"(%p, %u, %p, %p, %p, %p, %p)
\n
"
,
context
,
num_devices
,
device_list
,
lengths
,
binaries
,
binary_status
,
errcode_ret
);
return
opencl_funcs
->
pclCreateProgramWithBinary
(
context
,
num_devices
,
device_list
,
lengths
,
binaries
,
binary_status
,
errcode_ret
);
OPENCL_CALL
(
clCreateProgramWithBinary
,
&
params
);
return
__retval
;
}
cl_program
WINAPI
clCreateProgramWithBuiltInKernels
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
kernel_names
,
cl_int
*
errcode_ret
)
{
cl_program
__retval
;
struct
clCreateProgramWithBuiltInKernels_params
params
=
{
&
__retval
,
context
,
num_devices
,
device_list
,
kernel_names
,
errcode_ret
};
TRACE
(
"(%p, %u, %p, %p, %p)
\n
"
,
context
,
num_devices
,
device_list
,
kernel_names
,
errcode_ret
);
return
opencl_funcs
->
pclCreateProgramWithBuiltInKernels
(
context
,
num_devices
,
device_list
,
kernel_names
,
errcode_ret
);
OPENCL_CALL
(
clCreateProgramWithBuiltInKernels
,
&
params
);
return
__retval
;
}
cl_program
WINAPI
clCreateProgramWithSource
(
cl_context
context
,
cl_uint
count
,
const
char
**
strings
,
const
size_t
*
lengths
,
cl_int
*
errcode_ret
)
{
cl_program
__retval
;
struct
clCreateProgramWithSource_params
params
=
{
&
__retval
,
context
,
count
,
strings
,
lengths
,
errcode_ret
};
TRACE
(
"(%p, %u, %p, %p, %p)
\n
"
,
context
,
count
,
strings
,
lengths
,
errcode_ret
);
return
opencl_funcs
->
pclCreateProgramWithSource
(
context
,
count
,
strings
,
lengths
,
errcode_ret
);
OPENCL_CALL
(
clCreateProgramWithSource
,
&
params
);
return
__retval
;
}
cl_sampler
WINAPI
clCreateSampler
(
cl_context
context
,
cl_bool
normalized_coords
,
cl_addressing_mode
addressing_mode
,
cl_filter_mode
filter_mode
,
cl_int
*
errcode_ret
)
{
cl_sampler
__retval
;
struct
clCreateSampler_params
params
=
{
&
__retval
,
context
,
normalized_coords
,
addressing_mode
,
filter_mode
,
errcode_ret
};
TRACE
(
"(%p, %u, %u, %u, %p)
\n
"
,
context
,
normalized_coords
,
addressing_mode
,
filter_mode
,
errcode_ret
);
return
opencl_funcs
->
pclCreateSampler
(
context
,
normalized_coords
,
addressing_mode
,
filter_mode
,
errcode_ret
);
OPENCL_CALL
(
clCreateSampler
,
&
params
);
return
__retval
;
}
cl_mem
WINAPI
clCreateSubBuffer
(
cl_mem
buffer
,
cl_mem_flags
flags
,
cl_buffer_create_type
buffer_create_type
,
const
void
*
buffer_create_info
,
cl_int
*
errcode_ret
)
{
cl_mem
__retval
;
struct
clCreateSubBuffer_params
params
=
{
&
__retval
,
buffer
,
flags
,
buffer_create_type
,
buffer_create_info
,
errcode_ret
};
TRACE
(
"(%p, %s, %u, %p, %p)
\n
"
,
buffer
,
wine_dbgstr_longlong
(
flags
),
buffer_create_type
,
buffer_create_info
,
errcode_ret
);
return
opencl_funcs
->
pclCreateSubBuffer
(
buffer
,
flags
,
buffer_create_type
,
buffer_create_info
,
errcode_ret
);
OPENCL_CALL
(
clCreateSubBuffer
,
&
params
);
return
__retval
;
}
cl_int
WINAPI
clCreateSubDevices
(
cl_device_id
in_device
,
const
cl_device_partition_property
*
properties
,
cl_uint
num_devices
,
cl_device_id
*
out_devices
,
cl_uint
*
num_devices_ret
)
{
struct
clCreateSubDevices_params
params
=
{
in_device
,
properties
,
num_devices
,
out_devices
,
num_devices_ret
};
TRACE
(
"(%p, %p, %u, %p, %p)
\n
"
,
in_device
,
properties
,
num_devices
,
out_devices
,
num_devices_ret
);
return
opencl_funcs
->
pclCreateSubDevices
(
in_device
,
properties
,
num_devices
,
out_devices
,
num_devices_ret
);
return
OPENCL_CALL
(
clCreateSubDevices
,
&
params
);
}
cl_event
WINAPI
clCreateUserEvent
(
cl_context
context
,
cl_int
*
errcode_ret
)
{
cl_event
__retval
;
struct
clCreateUserEvent_params
params
=
{
&
__retval
,
context
,
errcode_ret
};
TRACE
(
"(%p, %p)
\n
"
,
context
,
errcode_ret
);
return
opencl_funcs
->
pclCreateUserEvent
(
context
,
errcode_ret
);
OPENCL_CALL
(
clCreateUserEvent
,
&
params
);
return
__retval
;
}
cl_int
WINAPI
clEnqueueBarrier
(
cl_command_queue
command_queue
)
{
struct
clEnqueueBarrier_params
params
=
{
command_queue
};
TRACE
(
"(%p)
\n
"
,
command_queue
);
return
opencl_funcs
->
pclEnqueueBarrier
(
command_queue
);
return
OPENCL_CALL
(
clEnqueueBarrier
,
&
params
);
}
cl_int
WINAPI
clEnqueueBarrierWithWaitList
(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueBarrierWithWaitList_params
params
=
{
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %u, %p, %p)
\n
"
,
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueBarrierWithWaitList
(
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueBarrierWithWaitList
,
&
params
);
}
cl_int
WINAPI
clEnqueueCopyBuffer
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
size_t
src_offset
,
size_t
dst_offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueCopyBuffer_params
params
=
{
command_queue
,
src_buffer
,
dst_buffer
,
src_offset
,
dst_offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %Iu, %Iu, %Iu, %u, %p, %p)
\n
"
,
command_queue
,
src_buffer
,
dst_buffer
,
src_offset
,
dst_offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueCopyBuffer
(
command_queue
,
src_buffer
,
dst_buffer
,
src_offset
,
dst_offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueCopyBuffer
,
&
params
);
}
cl_int
WINAPI
clEnqueueCopyBufferRect
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
size_t
src_row_pitch
,
size_t
src_slice_pitch
,
size_t
dst_row_pitch
,
size_t
dst_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueCopyBufferRect_params
params
=
{
command_queue
,
src_buffer
,
dst_buffer
,
src_origin
,
dst_origin
,
region
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %p, %p, %p, %Iu, %Iu, %Iu, %Iu, %u, %p, %p)
\n
"
,
command_queue
,
src_buffer
,
dst_buffer
,
src_origin
,
dst_origin
,
region
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueCopyBufferRect
(
command_queue
,
src_buffer
,
dst_buffer
,
src_origin
,
dst_origin
,
region
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueCopyBufferRect
,
&
params
);
}
cl_int
WINAPI
clEnqueueCopyBufferToImage
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_image
,
size_t
src_offset
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueCopyBufferToImage_params
params
=
{
command_queue
,
src_buffer
,
dst_image
,
src_offset
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %Iu, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
src_buffer
,
dst_image
,
src_offset
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueCopyBufferToImage
(
command_queue
,
src_buffer
,
dst_image
,
src_offset
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueCopyBufferToImage
,
&
params
);
}
cl_int
WINAPI
clEnqueueCopyImage
(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_image
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueCopyImage_params
params
=
{
command_queue
,
src_image
,
dst_image
,
src_origin
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %p, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
src_image
,
dst_image
,
src_origin
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueCopyImage
(
command_queue
,
src_image
,
dst_image
,
src_origin
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueCopyImage
,
&
params
);
}
cl_int
WINAPI
clEnqueueCopyImageToBuffer
(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
region
,
size_t
dst_offset
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueCopyImageToBuffer_params
params
=
{
command_queue
,
src_image
,
dst_buffer
,
src_origin
,
region
,
dst_offset
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %p, %p, %Iu, %u, %p, %p)
\n
"
,
command_queue
,
src_image
,
dst_buffer
,
src_origin
,
region
,
dst_offset
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueCopyImageToBuffer
(
command_queue
,
src_image
,
dst_buffer
,
src_origin
,
region
,
dst_offset
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueCopyImageToBuffer
,
&
params
);
}
cl_int
WINAPI
clEnqueueFillBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
const
void
*
pattern
,
size_t
pattern_size
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueFillBuffer_params
params
=
{
command_queue
,
buffer
,
pattern
,
pattern_size
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %Iu, %Iu, %Iu, %u, %p, %p)
\n
"
,
command_queue
,
buffer
,
pattern
,
pattern_size
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueFillBuffer
(
command_queue
,
buffer
,
pattern
,
pattern_size
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueFillBuffer
,
&
params
);
}
cl_int
WINAPI
clEnqueueFillImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
const
void
*
fill_color
,
const
size_t
*
origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueFillImage_params
params
=
{
command_queue
,
image
,
fill_color
,
origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
image
,
fill_color
,
origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueFillImage
(
command_queue
,
image
,
fill_color
,
origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueFillImage
,
&
params
);
}
void
*
WINAPI
clEnqueueMapBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
)
{
void
*
__retval
;
struct
clEnqueueMapBuffer_params
params
=
{
&
__retval
,
command_queue
,
buffer
,
blocking_map
,
map_flags
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
};
TRACE
(
"(%p, %p, %u, %s, %Iu, %Iu, %u, %p, %p, %p)
\n
"
,
command_queue
,
buffer
,
blocking_map
,
wine_dbgstr_longlong
(
map_flags
),
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
return
opencl_funcs
->
pclEnqueueMapBuffer
(
command_queue
,
buffer
,
blocking_map
,
map_flags
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
OPENCL_CALL
(
clEnqueueMapBuffer
,
&
params
);
return
__retval
;
}
void
*
WINAPI
clEnqueueMapImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
*
image_row_pitch
,
size_t
*
image_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
)
{
void
*
__retval
;
struct
clEnqueueMapImage_params
params
=
{
&
__retval
,
command_queue
,
image
,
blocking_map
,
map_flags
,
origin
,
region
,
image_row_pitch
,
image_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
};
TRACE
(
"(%p, %p, %u, %s, %p, %p, %p, %p, %u, %p, %p, %p)
\n
"
,
command_queue
,
image
,
blocking_map
,
wine_dbgstr_longlong
(
map_flags
),
origin
,
region
,
image_row_pitch
,
image_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
return
opencl_funcs
->
pclEnqueueMapImage
(
command_queue
,
image
,
blocking_map
,
map_flags
,
origin
,
region
,
image_row_pitch
,
image_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
OPENCL_CALL
(
clEnqueueMapImage
,
&
params
);
return
__retval
;
}
cl_int
WINAPI
clEnqueueMarker
(
cl_command_queue
command_queue
,
cl_event
*
event
)
{
struct
clEnqueueMarker_params
params
=
{
command_queue
,
event
};
TRACE
(
"(%p, %p)
\n
"
,
command_queue
,
event
);
return
opencl_funcs
->
pclEnqueueMarker
(
command_queue
,
event
);
return
OPENCL_CALL
(
clEnqueueMarker
,
&
params
);
}
cl_int
WINAPI
clEnqueueMarkerWithWaitList
(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueMarkerWithWaitList_params
params
=
{
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %u, %p, %p)
\n
"
,
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueMarkerWithWaitList
(
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueMarkerWithWaitList
,
&
params
);
}
cl_int
WINAPI
clEnqueueMigrateMemObjects
(
cl_command_queue
command_queue
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_objects
,
cl_mem_migration_flags
flags
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueMigrateMemObjects_params
params
=
{
command_queue
,
num_mem_objects
,
mem_objects
,
flags
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %u, %p, %s, %u, %p, %p)
\n
"
,
command_queue
,
num_mem_objects
,
mem_objects
,
wine_dbgstr_longlong
(
flags
),
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueMigrateMemObjects
(
command_queue
,
num_mem_objects
,
mem_objects
,
flags
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueMigrateMemObjects
,
&
params
);
}
cl_int
WINAPI
clEnqueueNDRangeKernel
(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
work_dim
,
const
size_t
*
global_work_offset
,
const
size_t
*
global_work_size
,
const
size_t
*
local_work_size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueNDRangeKernel_params
params
=
{
command_queue
,
kernel
,
work_dim
,
global_work_offset
,
global_work_size
,
local_work_size
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
kernel
,
work_dim
,
global_work_offset
,
global_work_size
,
local_work_size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueNDRangeKernel
(
command_queue
,
kernel
,
work_dim
,
global_work_offset
,
global_work_size
,
local_work_size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueNDRangeKernel
,
&
params
);
}
cl_int
WINAPI
clEnqueueNativeKernel
(
cl_command_queue
command_queue
,
void
(
WINAPI
*
user_func
)(
void
*
),
void
*
args
,
size_t
cb_args
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_list
,
const
void
**
args_mem_loc
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueNativeKernel_params
params
=
{
command_queue
,
user_func
,
args
,
cb_args
,
num_mem_objects
,
mem_list
,
args_mem_loc
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %Iu, %u, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
user_func
,
args
,
cb_args
,
num_mem_objects
,
mem_list
,
args_mem_loc
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueNativeKernel
(
command_queue
,
user_func
,
args
,
cb_args
,
num_mem_objects
,
mem_list
,
args_mem_loc
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueNativeKernel
,
&
params
);
}
cl_int
WINAPI
clEnqueueReadBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
size_t
offset
,
size_t
size
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueReadBuffer_params
params
=
{
command_queue
,
buffer
,
blocking_read
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
buffer
,
blocking_read
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueReadBuffer
(
command_queue
,
buffer
,
blocking_read
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueReadBuffer
,
&
params
);
}
cl_int
WINAPI
clEnqueueReadBufferRect
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueReadBufferRect_params
params
=
{
command_queue
,
buffer
,
blocking_read
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p, %p, %Iu, %Iu, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
buffer
,
blocking_read
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueReadBufferRect
(
command_queue
,
buffer
,
blocking_read
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueReadBufferRect
,
&
params
);
}
cl_int
WINAPI
clEnqueueReadImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_read
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
row_pitch
,
size_t
slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueReadImage_params
params
=
{
command_queue
,
image
,
blocking_read
,
origin
,
region
,
row_pitch
,
slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
image
,
blocking_read
,
origin
,
region
,
row_pitch
,
slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueReadImage
(
command_queue
,
image
,
blocking_read
,
origin
,
region
,
row_pitch
,
slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueReadImage
,
&
params
);
}
cl_int
WINAPI
clEnqueueTask
(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueTask_params
params
=
{
command_queue
,
kernel
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p)
\n
"
,
command_queue
,
kernel
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueTask
(
command_queue
,
kernel
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueTask
,
&
params
);
}
cl_int
WINAPI
clEnqueueUnmapMemObject
(
cl_command_queue
command_queue
,
cl_mem
memobj
,
void
*
mapped_ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueUnmapMemObject_params
params
=
{
command_queue
,
memobj
,
mapped_ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %p, %u, %p, %p)
\n
"
,
command_queue
,
memobj
,
mapped_ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueUnmapMemObject
(
command_queue
,
memobj
,
mapped_ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueUnmapMemObject
,
&
params
);
}
cl_int
WINAPI
clEnqueueWaitForEvents
(
cl_command_queue
command_queue
,
cl_uint
num_events
,
const
cl_event
*
event_list
)
{
struct
clEnqueueWaitForEvents_params
params
=
{
command_queue
,
num_events
,
event_list
};
TRACE
(
"(%p, %u, %p)
\n
"
,
command_queue
,
num_events
,
event_list
);
return
opencl_funcs
->
pclEnqueueWaitForEvents
(
command_queue
,
num_events
,
event_list
);
return
OPENCL_CALL
(
clEnqueueWaitForEvents
,
&
params
);
}
cl_int
WINAPI
clEnqueueWriteBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
size_t
offset
,
size_t
size
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueWriteBuffer_params
params
=
{
command_queue
,
buffer
,
blocking_write
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
buffer
,
blocking_write
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueWriteBuffer
(
command_queue
,
buffer
,
blocking_write
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueWriteBuffer
,
&
params
);
}
cl_int
WINAPI
clEnqueueWriteBufferRect
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueWriteBufferRect_params
params
=
{
command_queue
,
buffer
,
blocking_write
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p, %p, %Iu, %Iu, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
buffer
,
blocking_write
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueWriteBufferRect
(
command_queue
,
buffer
,
blocking_write
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueWriteBufferRect
,
&
params
);
}
cl_int
WINAPI
clEnqueueWriteImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_write
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
input_row_pitch
,
size_t
input_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
{
struct
clEnqueueWriteImage_params
params
=
{
command_queue
,
image
,
blocking_write
,
origin
,
region
,
input_row_pitch
,
input_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
};
TRACE
(
"(%p, %p, %u, %p, %p, %Iu, %Iu, %p, %u, %p, %p)
\n
"
,
command_queue
,
image
,
blocking_write
,
origin
,
region
,
input_row_pitch
,
input_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
opencl_funcs
->
pclEnqueueWriteImage
(
command_queue
,
image
,
blocking_write
,
origin
,
region
,
input_row_pitch
,
input_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
return
OPENCL_CALL
(
clEnqueueWriteImage
,
&
params
);
}
cl_int
WINAPI
clFinish
(
cl_command_queue
command_queue
)
{
struct
clFinish_params
params
=
{
command_queue
};
TRACE
(
"(%p)
\n
"
,
command_queue
);
return
opencl_funcs
->
pclFinish
(
command_queue
);
return
OPENCL_CALL
(
clFinish
,
&
params
);
}
cl_int
WINAPI
clFlush
(
cl_command_queue
command_queue
)
{
struct
clFlush_params
params
=
{
command_queue
};
TRACE
(
"(%p)
\n
"
,
command_queue
);
return
opencl_funcs
->
pclFlush
(
command_queue
);
return
OPENCL_CALL
(
clFlush
,
&
params
);
}
cl_int
WINAPI
clGetCommandQueueInfo
(
cl_command_queue
command_queue
,
cl_command_queue_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetCommandQueueInfo_params
params
=
{
command_queue
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
command_queue
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetCommandQueueInfo
(
command_queue
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetCommandQueueInfo
,
&
params
);
}
cl_int
WINAPI
clGetContextInfo
(
cl_context
context
,
cl_context_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetContextInfo_params
params
=
{
context
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
context
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetContextInfo
(
context
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetContextInfo
,
&
params
);
}
cl_int
WINAPI
clGetDeviceIDs
(
cl_platform_id
platform
,
cl_device_type
device_type
,
cl_uint
num_entries
,
cl_device_id
*
devices
,
cl_uint
*
num_devices
)
{
struct
clGetDeviceIDs_params
params
=
{
platform
,
device_type
,
num_entries
,
devices
,
num_devices
};
TRACE
(
"(%p, %s, %u, %p, %p)
\n
"
,
platform
,
wine_dbgstr_longlong
(
device_type
),
num_entries
,
devices
,
num_devices
);
return
opencl_funcs
->
pclGetDeviceIDs
(
platform
,
device_type
,
num_entries
,
devices
,
num_device
s
);
return
OPENCL_CALL
(
clGetDeviceIDs
,
&
param
s
);
}
cl_int
WINAPI
clGetEventInfo
(
cl_event
event
,
cl_event_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetEventInfo_params
params
=
{
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetEventInfo
(
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetEventInfo
,
&
params
);
}
cl_int
WINAPI
clGetEventProfilingInfo
(
cl_event
event
,
cl_profiling_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetEventProfilingInfo_params
params
=
{
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetEventProfilingInfo
(
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetEventProfilingInfo
,
&
params
);
}
cl_int
WINAPI
clGetImageInfo
(
cl_mem
image
,
cl_image_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetImageInfo_params
params
=
{
image
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
image
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetImageInfo
(
image
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetImageInfo
,
&
params
);
}
cl_int
WINAPI
clGetKernelArgInfo
(
cl_kernel
kernel
,
cl_uint
arg_index
,
cl_kernel_arg_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetKernelArgInfo_params
params
=
{
kernel
,
arg_index
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %u, %Iu, %p, %p)
\n
"
,
kernel
,
arg_index
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetKernelArgInfo
(
kernel
,
arg_index
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetKernelArgInfo
,
&
params
);
}
cl_int
WINAPI
clGetKernelInfo
(
cl_kernel
kernel
,
cl_kernel_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetKernelInfo_params
params
=
{
kernel
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
kernel
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetKernelInfo
(
kernel
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetKernelInfo
,
&
params
);
}
cl_int
WINAPI
clGetKernelWorkGroupInfo
(
cl_kernel
kernel
,
cl_device_id
device
,
cl_kernel_work_group_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetKernelWorkGroupInfo_params
params
=
{
kernel
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %p, %u, %Iu, %p, %p)
\n
"
,
kernel
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetKernelWorkGroupInfo
(
kernel
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetKernelWorkGroupInfo
,
&
params
);
}
cl_int
WINAPI
clGetMemObjectInfo
(
cl_mem
memobj
,
cl_mem_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetMemObjectInfo_params
params
=
{
memobj
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
memobj
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetMemObjectInfo
(
memobj
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetMemObjectInfo
,
&
params
);
}
cl_int
WINAPI
clGetPlatformIDs
(
cl_uint
num_entries
,
cl_platform_id
*
platforms
,
cl_uint
*
num_platforms
)
{
struct
clGetPlatformIDs_params
params
=
{
num_entries
,
platforms
,
num_platforms
};
TRACE
(
"(%u, %p, %p)
\n
"
,
num_entries
,
platforms
,
num_platforms
);
return
opencl_funcs
->
pclGetPlatformIDs
(
num_entries
,
platforms
,
num_platfor
ms
);
return
OPENCL_CALL
(
clGetPlatformIDs
,
&
para
ms
);
}
cl_int
WINAPI
clGetProgramBuildInfo
(
cl_program
program
,
cl_device_id
device
,
cl_program_build_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetProgramBuildInfo_params
params
=
{
program
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %p, %u, %Iu, %p, %p)
\n
"
,
program
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetProgramBuildInfo
(
program
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetProgramBuildInfo
,
&
params
);
}
cl_int
WINAPI
clGetProgramInfo
(
cl_program
program
,
cl_program_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetProgramInfo_params
params
=
{
program
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
program
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetProgramInfo
(
program
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetProgramInfo
,
&
params
);
}
cl_int
WINAPI
clGetSamplerInfo
(
cl_sampler
sampler
,
cl_sampler_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
{
struct
clGetSamplerInfo_params
params
=
{
sampler
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
};
TRACE
(
"(%p, %u, %Iu, %p, %p)
\n
"
,
sampler
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
opencl_funcs
->
pclGetSamplerInfo
(
sampler
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
return
OPENCL_CALL
(
clGetSamplerInfo
,
&
params
);
}
cl_int
WINAPI
clGetSupportedImageFormats
(
cl_context
context
,
cl_mem_flags
flags
,
cl_mem_object_type
image_type
,
cl_uint
num_entries
,
cl_image_format
*
image_formats
,
cl_uint
*
num_image_formats
)
{
struct
clGetSupportedImageFormats_params
params
=
{
context
,
flags
,
image_type
,
num_entries
,
image_formats
,
num_image_formats
};
TRACE
(
"(%p, %s, %u, %u, %p, %p)
\n
"
,
context
,
wine_dbgstr_longlong
(
flags
),
image_type
,
num_entries
,
image_formats
,
num_image_formats
);
return
opencl_funcs
->
pclGetSupportedImageFormats
(
context
,
flags
,
image_type
,
num_entries
,
image_formats
,
num_image_format
s
);
return
OPENCL_CALL
(
clGetSupportedImageFormats
,
&
param
s
);
}
cl_program
WINAPI
clLinkProgram
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_programs
,
const
cl_program
*
input_programs
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
{
cl_program
__retval
;
struct
clLinkProgram_params
params
=
{
&
__retval
,
context
,
num_devices
,
device_list
,
options
,
num_input_programs
,
input_programs
,
pfn_notify
,
user_data
,
errcode_ret
};
TRACE
(
"(%p, %u, %p, %p, %u, %p, %p, %p, %p)
\n
"
,
context
,
num_devices
,
device_list
,
options
,
num_input_programs
,
input_programs
,
pfn_notify
,
user_data
,
errcode_ret
);
return
opencl_funcs
->
pclLinkProgram
(
context
,
num_devices
,
device_list
,
options
,
num_input_programs
,
input_programs
,
pfn_notify
,
user_data
,
errcode_ret
);
OPENCL_CALL
(
clLinkProgram
,
&
params
);
return
__retval
;
}
cl_int
WINAPI
clReleaseCommandQueue
(
cl_command_queue
command_queue
)
{
struct
clReleaseCommandQueue_params
params
=
{
command_queue
};
TRACE
(
"(%p)
\n
"
,
command_queue
);
return
opencl_funcs
->
pclReleaseCommandQueue
(
command_queue
);
return
OPENCL_CALL
(
clReleaseCommandQueue
,
&
params
);
}
cl_int
WINAPI
clReleaseContext
(
cl_context
context
)
{
struct
clReleaseContext_params
params
=
{
context
};
TRACE
(
"(%p)
\n
"
,
context
);
return
opencl_funcs
->
pclReleaseContext
(
context
);
return
OPENCL_CALL
(
clReleaseContext
,
&
params
);
}
cl_int
WINAPI
clReleaseDevice
(
cl_device_id
device
)
{
struct
clReleaseDevice_params
params
=
{
device
};
TRACE
(
"(%p)
\n
"
,
device
);
return
opencl_funcs
->
pclReleaseDevice
(
device
);
return
OPENCL_CALL
(
clReleaseDevice
,
&
params
);
}
cl_int
WINAPI
clReleaseEvent
(
cl_event
event
)
{
struct
clReleaseEvent_params
params
=
{
event
};
TRACE
(
"(%p)
\n
"
,
event
);
return
opencl_funcs
->
pclReleaseEvent
(
event
);
return
OPENCL_CALL
(
clReleaseEvent
,
&
params
);
}
cl_int
WINAPI
clReleaseKernel
(
cl_kernel
kernel
)
{
struct
clReleaseKernel_params
params
=
{
kernel
};
TRACE
(
"(%p)
\n
"
,
kernel
);
return
opencl_funcs
->
pclReleaseKernel
(
kernel
);
return
OPENCL_CALL
(
clReleaseKernel
,
&
params
);
}
cl_int
WINAPI
clReleaseMemObject
(
cl_mem
memobj
)
{
struct
clReleaseMemObject_params
params
=
{
memobj
};
TRACE
(
"(%p)
\n
"
,
memobj
);
return
opencl_funcs
->
pclReleaseMemObject
(
memobj
);
return
OPENCL_CALL
(
clReleaseMemObject
,
&
params
);
}
cl_int
WINAPI
clReleaseProgram
(
cl_program
program
)
{
struct
clReleaseProgram_params
params
=
{
program
};
TRACE
(
"(%p)
\n
"
,
program
);
return
opencl_funcs
->
pclReleaseProgram
(
program
);
return
OPENCL_CALL
(
clReleaseProgram
,
&
params
);
}
cl_int
WINAPI
clReleaseSampler
(
cl_sampler
sampler
)
{
struct
clReleaseSampler_params
params
=
{
sampler
};
TRACE
(
"(%p)
\n
"
,
sampler
);
return
opencl_funcs
->
pclReleaseSampler
(
sampler
);
return
OPENCL_CALL
(
clReleaseSampler
,
&
params
);
}
cl_int
WINAPI
clRetainCommandQueue
(
cl_command_queue
command_queue
)
{
struct
clRetainCommandQueue_params
params
=
{
command_queue
};
TRACE
(
"(%p)
\n
"
,
command_queue
);
return
opencl_funcs
->
pclRetainCommandQueue
(
command_queue
);
return
OPENCL_CALL
(
clRetainCommandQueue
,
&
params
);
}
cl_int
WINAPI
clRetainContext
(
cl_context
context
)
{
struct
clRetainContext_params
params
=
{
context
};
TRACE
(
"(%p)
\n
"
,
context
);
return
opencl_funcs
->
pclRetainContext
(
context
);
return
OPENCL_CALL
(
clRetainContext
,
&
params
);
}
cl_int
WINAPI
clRetainDevice
(
cl_device_id
device
)
{
struct
clRetainDevice_params
params
=
{
device
};
TRACE
(
"(%p)
\n
"
,
device
);
return
opencl_funcs
->
pclRetainDevice
(
device
);
return
OPENCL_CALL
(
clRetainDevice
,
&
params
);
}
cl_int
WINAPI
clRetainEvent
(
cl_event
event
)
{
struct
clRetainEvent_params
params
=
{
event
};
TRACE
(
"(%p)
\n
"
,
event
);
return
opencl_funcs
->
pclRetainEvent
(
event
);
return
OPENCL_CALL
(
clRetainEvent
,
&
params
);
}
cl_int
WINAPI
clRetainKernel
(
cl_kernel
kernel
)
{
struct
clRetainKernel_params
params
=
{
kernel
};
TRACE
(
"(%p)
\n
"
,
kernel
);
return
opencl_funcs
->
pclRetainKernel
(
kernel
);
return
OPENCL_CALL
(
clRetainKernel
,
&
params
);
}
cl_int
WINAPI
clRetainMemObject
(
cl_mem
memobj
)
{
struct
clRetainMemObject_params
params
=
{
memobj
};
TRACE
(
"(%p)
\n
"
,
memobj
);
return
opencl_funcs
->
pclRetainMemObject
(
memobj
);
return
OPENCL_CALL
(
clRetainMemObject
,
&
params
);
}
cl_int
WINAPI
clRetainProgram
(
cl_program
program
)
{
struct
clRetainProgram_params
params
=
{
program
};
TRACE
(
"(%p)
\n
"
,
program
);
return
opencl_funcs
->
pclRetainProgram
(
program
);
return
OPENCL_CALL
(
clRetainProgram
,
&
params
);
}
cl_int
WINAPI
clRetainSampler
(
cl_sampler
sampler
)
{
struct
clRetainSampler_params
params
=
{
sampler
};
TRACE
(
"(%p)
\n
"
,
sampler
);
return
opencl_funcs
->
pclRetainSampler
(
sampler
);
return
OPENCL_CALL
(
clRetainSampler
,
&
params
);
}
cl_int
WINAPI
clSetEventCallback
(
cl_event
event
,
cl_int
command_exec_callback_type
,
void
(
WINAPI
*
pfn_notify
)(
cl_event
event
,
cl_int
event_command_status
,
void
*
user_data
),
void
*
user_data
)
{
struct
clSetEventCallback_params
params
=
{
event
,
command_exec_callback_type
,
pfn_notify
,
user_data
};
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
event
,
command_exec_callback_type
,
pfn_notify
,
user_data
);
return
opencl_funcs
->
pclSetEventCallback
(
event
,
command_exec_callback_type
,
pfn_notify
,
user_data
);
return
OPENCL_CALL
(
clSetEventCallback
,
&
params
);
}
cl_int
WINAPI
clSetKernelArg
(
cl_kernel
kernel
,
cl_uint
arg_index
,
size_t
arg_size
,
const
void
*
arg_value
)
{
struct
clSetKernelArg_params
params
=
{
kernel
,
arg_index
,
arg_size
,
arg_value
};
TRACE
(
"(%p, %u, %Iu, %p)
\n
"
,
kernel
,
arg_index
,
arg_size
,
arg_value
);
return
opencl_funcs
->
pclSetKernelArg
(
kernel
,
arg_index
,
arg_size
,
arg_value
);
return
OPENCL_CALL
(
clSetKernelArg
,
&
params
);
}
cl_int
WINAPI
clSetMemObjectDestructorCallback
(
cl_mem
memobj
,
void
(
WINAPI
*
pfn_notify
)(
cl_mem
memobj
,
void
*
user_data
),
void
*
user_data
)
{
struct
clSetMemObjectDestructorCallback_params
params
=
{
memobj
,
pfn_notify
,
user_data
};
TRACE
(
"(%p, %p, %p)
\n
"
,
memobj
,
pfn_notify
,
user_data
);
return
opencl_funcs
->
pclSetMemObjectDestructorCallback
(
memobj
,
pfn_notify
,
user_data
);
return
OPENCL_CALL
(
clSetMemObjectDestructorCallback
,
&
params
);
}
cl_int
WINAPI
clSetUserEventStatus
(
cl_event
event
,
cl_int
execution_status
)
{
struct
clSetUserEventStatus_params
params
=
{
event
,
execution_status
};
TRACE
(
"(%p, %d)
\n
"
,
event
,
execution_status
);
return
opencl_funcs
->
pclSetUserEventStatus
(
event
,
execution_statu
s
);
return
OPENCL_CALL
(
clSetUserEventStatus
,
&
param
s
);
}
cl_int
WINAPI
clUnloadCompiler
(
void
)
{
struct
clUnloadCompiler_params
params
=
{};
TRACE
(
"()
\n
"
);
return
opencl_funcs
->
pclUnloadCompiler
(
);
return
OPENCL_CALL
(
clUnloadCompiler
,
&
params
);
}
cl_int
WINAPI
clUnloadPlatformCompiler
(
cl_platform_id
platform
)
{
struct
clUnloadPlatformCompiler_params
params
=
{
platform
};
TRACE
(
"(%p)
\n
"
,
platform
);
return
opencl_funcs
->
pclUnloadPlatformCompiler
(
platform
);
return
OPENCL_CALL
(
clUnloadPlatformCompiler
,
&
params
);
}
cl_int
WINAPI
clWaitForEvents
(
cl_uint
num_events
,
const
cl_event
*
event_list
)
{
struct
clWaitForEvents_params
params
=
{
num_events
,
event_list
};
TRACE
(
"(%u, %p)
\n
"
,
num_events
,
event_list
);
return
opencl_funcs
->
pclWaitForEvents
(
num_events
,
event_list
);
return
OPENCL_CALL
(
clWaitForEvents
,
&
params
);
}
BOOL
extension_is_supported
(
const
char
*
name
,
size_t
len
)
...
...
dlls/opencl/pe_wrappers.c
View file @
37c40316
...
...
@@ -24,7 +24,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
opencl
);
const
struct
opencl_funcs
*
opencl_funcs
=
NULL
;
unixlib_handle_t
opencl_handle
=
0
;
static
cl_int
filter_extensions
(
const
char
*
unix_exts
,
SIZE_T
size
,
char
*
win_exts
,
size_t
*
ret_size
)
{
...
...
@@ -91,14 +91,18 @@ cl_int WINAPI clGetPlatformInfo( cl_platform_id platform, cl_platform_info name,
{
size_t
unix_size
;
char
*
unix_exts
;
struct
clGetPlatformInfo_params
params
=
{
platform
,
name
,
0
,
NULL
,
&
unix_size
};
ret
=
opencl_funcs
->
pclGetPlatformInfo
(
platform
,
name
,
0
,
NULL
,
&
unix_size
);
ret
=
OPENCL_CALL
(
clGetPlatformInfo
,
&
params
);
if
(
ret
!=
CL_SUCCESS
)
return
ret
;
if
(
!
(
unix_exts
=
malloc
(
unix_size
)))
return
CL_OUT_OF_HOST_MEMORY
;
ret
=
opencl_funcs
->
pclGetPlatformInfo
(
platform
,
name
,
unix_size
,
unix_exts
,
NULL
);
params
.
param_value_size
=
unix_size
;
params
.
param_value
=
unix_exts
;
params
.
param_value_size_ret
=
NULL
;
ret
=
OPENCL_CALL
(
clGetPlatformInfo
,
&
params
);
if
(
ret
!=
CL_SUCCESS
)
{
free
(
unix_exts
);
...
...
@@ -111,7 +115,8 @@ cl_int WINAPI clGetPlatformInfo( cl_platform_id platform, cl_platform_info name,
}
else
{
ret
=
opencl_funcs
->
pclGetPlatformInfo
(
platform
,
name
,
size
,
value
,
ret_size
);
struct
clGetPlatformInfo_params
params
=
{
platform
,
name
,
size
,
value
,
ret_size
};
ret
=
OPENCL_CALL
(
clGetPlatformInfo
,
&
params
);
}
return
ret
;
...
...
@@ -129,14 +134,18 @@ cl_int WINAPI clGetDeviceInfo( cl_device_id device, cl_device_info name,
{
size_t
unix_size
;
char
*
unix_exts
;
struct
clGetDeviceInfo_params
params
=
{
device
,
name
,
0
,
NULL
,
&
unix_size
};
ret
=
opencl_funcs
->
pclGetDeviceInfo
(
device
,
name
,
0
,
NULL
,
&
unix_size
);
ret
=
OPENCL_CALL
(
clGetDeviceInfo
,
&
params
);
if
(
ret
!=
CL_SUCCESS
)
return
ret
;
if
(
!
(
unix_exts
=
malloc
(
unix_size
)))
return
CL_OUT_OF_HOST_MEMORY
;
ret
=
opencl_funcs
->
pclGetDeviceInfo
(
device
,
name
,
unix_size
,
unix_exts
,
NULL
);
params
.
param_value_size
=
unix_size
;
params
.
param_value
=
unix_exts
;
params
.
param_value_size_ret
=
NULL
;
ret
=
OPENCL_CALL
(
clGetDeviceInfo
,
&
params
);
if
(
ret
!=
CL_SUCCESS
)
{
free
(
unix_exts
);
...
...
@@ -149,7 +158,8 @@ cl_int WINAPI clGetDeviceInfo( cl_device_id device, cl_device_info name,
}
else
{
ret
=
opencl_funcs
->
pclGetDeviceInfo
(
device
,
name
,
size
,
value
,
ret_size
);
struct
clGetDeviceInfo_params
params
=
{
device
,
name
,
size
,
value
,
ret_size
};
ret
=
OPENCL_CALL
(
clGetDeviceInfo
,
&
params
);
}
/* Filter out the CL_EXEC_NATIVE_KERNEL flag */
...
...
@@ -197,7 +207,8 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
if
(
reason
==
DLL_PROCESS_ATTACH
)
{
DisableThreadLibraryCalls
(
instance
);
return
!
__wine_init_unix_lib
(
instance
,
reason
,
NULL
,
&
opencl_funcs
);
return
!
NtQueryVirtualMemory
(
GetCurrentProcess
(),
instance
,
MemoryWineUnixFuncs
,
&
opencl_handle
,
sizeof
(
opencl_handle
),
NULL
);
}
return
TRUE
;
}
dlls/opencl/unix_private.h
View file @
37c40316
...
...
@@ -27,7 +27,7 @@
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "wine/unixlib.h"
#include "wine/debug.h"
#define CL_SILENCE_DEPRECATION
...
...
@@ -44,44 +44,13 @@
#include "unixlib.h"
cl_int
WINAPI
wrap_clBuildProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
DECLSPEC_HIDDEN
;
cl_context
WINAPI
wrap_clCreateContext
(
const
cl_context_properties
*
properties
,
cl_uint
num_devices
,
const
cl_device_id
*
devices
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
DECLSPEC_HIDDEN
;
cl_context
WINAPI
wrap_clCreateContextFromType
(
const
cl_context_properties
*
properties
,
cl_device_type
device_type
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
DECLSPEC_HIDDEN
;
cl_int
WINAPI
wrap_clEnqueueNativeKernel
(
cl_command_queue
command_queue
,
void
(
WINAPI
*
user_func
)(
void
*
),
void
*
args
,
size_t
cb_args
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_list
,
const
void
**
args_mem_loc
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
DECLSPEC_HIDDEN
;
cl_int
WINAPI
wrap_clSetEventCallback
(
cl_event
event
,
cl_int
type
,
void
(
WINAPI
*
pfn_notify
)(
cl_event
,
cl_int
,
void
*
),
void
*
user_data
)
DECLSPEC_HIDDEN
;
cl_int
WINAPI
wrap_clSetMemObjectDestructorCallback
(
cl_mem
memobj
,
void
(
WINAPI
*
pfn_notify
)(
cl_mem
,
void
*
),
void
*
user_data
)
DECLSPEC_HIDDEN
;
cl_int
WINAPI
wrap_clCompileProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_headers
,
const
cl_program
*
input_headers
,
const
char
**
header_include_names
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
DECLSPEC_HIDDEN
;
cl_program
WINAPI
wrap_clLinkProgram
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_programs
,
const
cl_program
*
input_programs
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
DECLSPEC_HIDDEN
;
extern
const
struct
opencl_funcs
funcs
;
NTSTATUS
wrap_clBuildProgram
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clCreateContext
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clCreateContextFromType
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clEnqueueNativeKernel
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clSetEventCallback
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clSetMemObjectDestructorCallback
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clCompileProgram
(
void
*
args
)
DECLSPEC_HIDDEN
;
NTSTATUS
wrap_clLinkProgram
(
void
*
args
)
DECLSPEC_HIDDEN
;
#endif
dlls/opencl/unix_thunks.c
View file @
37c40316
...
...
@@ -7,397 +7,565 @@
#include "config.h"
#include "unix_private.h"
static
cl_mem
WINAPI
wrap_clCreateBuffer
(
cl_context
context
,
cl_mem_flags
flags
,
size_t
size
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateBuffer
(
void
*
args
)
{
return
clCreateBuffer
(
context
,
flags
,
size
,
host_ptr
,
errcode_ret
);
struct
clCreateBuffer_params
*
params
=
args
;
*
params
->
__retval
=
clCreateBuffer
(
params
->
context
,
params
->
flags
,
params
->
size
,
params
->
host_ptr
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_command_queue
WINAPI
wrap_clCreateCommandQueue
(
cl_context
context
,
cl_device_id
device
,
cl_command_queue_properties
properties
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateCommandQueue
(
void
*
args
)
{
return
clCreateCommandQueue
(
context
,
device
,
properties
,
errcode_ret
);
struct
clCreateCommandQueue_params
*
params
=
args
;
*
params
->
__retval
=
clCreateCommandQueue
(
params
->
context
,
params
->
device
,
params
->
properties
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_mem
WINAPI
wrap_clCreateImage
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
const
cl_image_desc
*
image_desc
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateImage
(
void
*
args
)
{
return
clCreateImage
(
context
,
flags
,
image_format
,
image_desc
,
host_ptr
,
errcode_ret
);
struct
clCreateImage_params
*
params
=
args
;
*
params
->
__retval
=
clCreateImage
(
params
->
context
,
params
->
flags
,
params
->
image_format
,
params
->
image_desc
,
params
->
host_ptr
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_mem
WINAPI
wrap_clCreateImage2D
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_row_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateImage2D
(
void
*
args
)
{
return
clCreateImage2D
(
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_row_pitch
,
host_ptr
,
errcode_ret
);
struct
clCreateImage2D_params
*
params
=
args
;
*
params
->
__retval
=
clCreateImage2D
(
params
->
context
,
params
->
flags
,
params
->
image_format
,
params
->
image_width
,
params
->
image_height
,
params
->
image_row_pitch
,
params
->
host_ptr
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_mem
WINAPI
wrap_clCreateImage3D
(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_depth
,
size_t
image_row_pitch
,
size_t
image_slice_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateImage3D
(
void
*
args
)
{
return
clCreateImage3D
(
context
,
flags
,
image_format
,
image_width
,
image_height
,
image_depth
,
image_row_pitch
,
image_slice_pitch
,
host_ptr
,
errcode_ret
);
struct
clCreateImage3D_params
*
params
=
args
;
*
params
->
__retval
=
clCreateImage3D
(
params
->
context
,
params
->
flags
,
params
->
image_format
,
params
->
image_width
,
params
->
image_height
,
params
->
image_depth
,
params
->
image_row_pitch
,
params
->
image_slice_pitch
,
params
->
host_ptr
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_kernel
WINAPI
wrap_clCreateKernel
(
cl_program
program
,
const
char
*
kernel_name
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateKernel
(
void
*
args
)
{
return
clCreateKernel
(
program
,
kernel_name
,
errcode_ret
);
struct
clCreateKernel_params
*
params
=
args
;
*
params
->
__retval
=
clCreateKernel
(
params
->
program
,
params
->
kernel_name
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_int
WINAPI
wrap_clCreateKernelsInProgram
(
cl_program
program
,
cl_uint
num_kernels
,
cl_kernel
*
kernels
,
cl_uint
*
num_kernels_ret
)
static
NTSTATUS
wrap_clCreateKernelsInProgram
(
void
*
args
)
{
return
clCreateKernelsInProgram
(
program
,
num_kernels
,
kernels
,
num_kernels_ret
);
struct
clCreateKernelsInProgram_params
*
params
=
args
;
return
clCreateKernelsInProgram
(
params
->
program
,
params
->
num_kernels
,
params
->
kernels
,
params
->
num_kernels_ret
);
}
static
cl_program
WINAPI
wrap_clCreateProgramWithBinary
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
size_t
*
lengths
,
const
unsigned
char
**
binaries
,
cl_int
*
binary_status
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateProgramWithBinary
(
void
*
args
)
{
return
clCreateProgramWithBinary
(
context
,
num_devices
,
device_list
,
lengths
,
binaries
,
binary_status
,
errcode_ret
);
struct
clCreateProgramWithBinary_params
*
params
=
args
;
*
params
->
__retval
=
clCreateProgramWithBinary
(
params
->
context
,
params
->
num_devices
,
params
->
device_list
,
params
->
lengths
,
params
->
binaries
,
params
->
binary_status
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_program
WINAPI
wrap_clCreateProgramWithBuiltInKernels
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
kernel_names
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateProgramWithBuiltInKernels
(
void
*
args
)
{
return
clCreateProgramWithBuiltInKernels
(
context
,
num_devices
,
device_list
,
kernel_names
,
errcode_ret
);
struct
clCreateProgramWithBuiltInKernels_params
*
params
=
args
;
*
params
->
__retval
=
clCreateProgramWithBuiltInKernels
(
params
->
context
,
params
->
num_devices
,
params
->
device_list
,
params
->
kernel_names
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_program
WINAPI
wrap_clCreateProgramWithSource
(
cl_context
context
,
cl_uint
count
,
const
char
**
strings
,
const
size_t
*
lengths
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateProgramWithSource
(
void
*
args
)
{
return
clCreateProgramWithSource
(
context
,
count
,
strings
,
lengths
,
errcode_ret
);
struct
clCreateProgramWithSource_params
*
params
=
args
;
*
params
->
__retval
=
clCreateProgramWithSource
(
params
->
context
,
params
->
count
,
params
->
strings
,
params
->
lengths
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_sampler
WINAPI
wrap_clCreateSampler
(
cl_context
context
,
cl_bool
normalized_coords
,
cl_addressing_mode
addressing_mode
,
cl_filter_mode
filter_mode
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateSampler
(
void
*
args
)
{
return
clCreateSampler
(
context
,
normalized_coords
,
addressing_mode
,
filter_mode
,
errcode_ret
);
struct
clCreateSampler_params
*
params
=
args
;
*
params
->
__retval
=
clCreateSampler
(
params
->
context
,
params
->
normalized_coords
,
params
->
addressing_mode
,
params
->
filter_mode
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_mem
WINAPI
wrap_clCreateSubBuffer
(
cl_mem
buffer
,
cl_mem_flags
flags
,
cl_buffer_create_type
buffer_create_type
,
const
void
*
buffer_create_info
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateSubBuffer
(
void
*
args
)
{
return
clCreateSubBuffer
(
buffer
,
flags
,
buffer_create_type
,
buffer_create_info
,
errcode_ret
);
struct
clCreateSubBuffer_params
*
params
=
args
;
*
params
->
__retval
=
clCreateSubBuffer
(
params
->
buffer
,
params
->
flags
,
params
->
buffer_create_type
,
params
->
buffer_create_info
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_int
WINAPI
wrap_clCreateSubDevices
(
cl_device_id
in_device
,
const
cl_device_partition_property
*
properties
,
cl_uint
num_devices
,
cl_device_id
*
out_devices
,
cl_uint
*
num_devices_ret
)
static
NTSTATUS
wrap_clCreateSubDevices
(
void
*
args
)
{
return
clCreateSubDevices
(
in_device
,
properties
,
num_devices
,
out_devices
,
num_devices_ret
);
struct
clCreateSubDevices_params
*
params
=
args
;
return
clCreateSubDevices
(
params
->
in_device
,
params
->
properties
,
params
->
num_devices
,
params
->
out_devices
,
params
->
num_devices_ret
);
}
static
cl_event
WINAPI
wrap_clCreateUserEvent
(
cl_context
context
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clCreateUserEvent
(
void
*
args
)
{
return
clCreateUserEvent
(
context
,
errcode_ret
);
struct
clCreateUserEvent_params
*
params
=
args
;
*
params
->
__retval
=
clCreateUserEvent
(
params
->
context
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_int
WINAPI
wrap_clEnqueueBarrier
(
cl_command_queue
command_queue
)
static
NTSTATUS
wrap_clEnqueueBarrier
(
void
*
args
)
{
return
clEnqueueBarrier
(
command_queue
);
struct
clEnqueueBarrier_params
*
params
=
args
;
return
clEnqueueBarrier
(
params
->
command_queue
);
}
static
cl_int
WINAPI
wrap_clEnqueueBarrierWithWaitList
(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueBarrierWithWaitList
(
void
*
args
)
{
return
clEnqueueBarrierWithWaitList
(
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueBarrierWithWaitList_params
*
params
=
args
;
return
clEnqueueBarrierWithWaitList
(
params
->
command_queue
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueCopyBuffer
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
size_t
src_offset
,
size_t
dst_offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueCopyBuffer
(
void
*
args
)
{
return
clEnqueueCopyBuffer
(
command_queue
,
src_buffer
,
dst_buffer
,
src_offset
,
dst_offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueCopyBuffer_params
*
params
=
args
;
return
clEnqueueCopyBuffer
(
params
->
command_queue
,
params
->
src_buffer
,
params
->
dst_buffer
,
params
->
src_offset
,
params
->
dst_offset
,
params
->
size
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueCopyBufferRect
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
size_t
src_row_pitch
,
size_t
src_slice_pitch
,
size_t
dst_row_pitch
,
size_t
dst_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueCopyBufferRect
(
void
*
args
)
{
return
clEnqueueCopyBufferRect
(
command_queue
,
src_buffer
,
dst_buffer
,
src_origin
,
dst_origin
,
region
,
src_row_pitch
,
src_slice_pitch
,
dst_row_pitch
,
dst_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueCopyBufferRect_params
*
params
=
args
;
return
clEnqueueCopyBufferRect
(
params
->
command_queue
,
params
->
src_buffer
,
params
->
dst_buffer
,
params
->
src_origin
,
params
->
dst_origin
,
params
->
region
,
params
->
src_row_pitch
,
params
->
src_slice_pitch
,
params
->
dst_row_pitch
,
params
->
dst_slice_pitch
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueCopyBufferToImage
(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_image
,
size_t
src_offset
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueCopyBufferToImage
(
void
*
args
)
{
return
clEnqueueCopyBufferToImage
(
command_queue
,
src_buffer
,
dst_image
,
src_offset
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueCopyBufferToImage_params
*
params
=
args
;
return
clEnqueueCopyBufferToImage
(
params
->
command_queue
,
params
->
src_buffer
,
params
->
dst_image
,
params
->
src_offset
,
params
->
dst_origin
,
params
->
region
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueCopyImage
(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_image
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueCopyImage
(
void
*
args
)
{
return
clEnqueueCopyImage
(
command_queue
,
src_image
,
dst_image
,
src_origin
,
dst_origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueCopyImage_params
*
params
=
args
;
return
clEnqueueCopyImage
(
params
->
command_queue
,
params
->
src_image
,
params
->
dst_image
,
params
->
src_origin
,
params
->
dst_origin
,
params
->
region
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueCopyImageToBuffer
(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
region
,
size_t
dst_offset
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueCopyImageToBuffer
(
void
*
args
)
{
return
clEnqueueCopyImageToBuffer
(
command_queue
,
src_image
,
dst_buffer
,
src_origin
,
region
,
dst_offset
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueCopyImageToBuffer_params
*
params
=
args
;
return
clEnqueueCopyImageToBuffer
(
params
->
command_queue
,
params
->
src_image
,
params
->
dst_buffer
,
params
->
src_origin
,
params
->
region
,
params
->
dst_offset
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueFillBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
const
void
*
pattern
,
size_t
pattern_size
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueFillBuffer
(
void
*
args
)
{
return
clEnqueueFillBuffer
(
command_queue
,
buffer
,
pattern
,
pattern_size
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueFillBuffer_params
*
params
=
args
;
return
clEnqueueFillBuffer
(
params
->
command_queue
,
params
->
buffer
,
params
->
pattern
,
params
->
pattern_size
,
params
->
offset
,
params
->
size
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueFillImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
const
void
*
fill_color
,
const
size_t
*
origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueFillImage
(
void
*
args
)
{
return
clEnqueueFillImage
(
command_queue
,
image
,
fill_color
,
origin
,
region
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueFillImage_params
*
params
=
args
;
return
clEnqueueFillImage
(
params
->
command_queue
,
params
->
image
,
params
->
fill_color
,
params
->
origin
,
params
->
region
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
void
*
WINAPI
wrap_clEnqueueMapBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clEnqueueMapBuffer
(
void
*
args
)
{
return
clEnqueueMapBuffer
(
command_queue
,
buffer
,
blocking_map
,
map_flags
,
offset
,
size
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
struct
clEnqueueMapBuffer_params
*
params
=
args
;
*
params
->
__retval
=
clEnqueueMapBuffer
(
params
->
command_queue
,
params
->
buffer
,
params
->
blocking_map
,
params
->
map_flags
,
params
->
offset
,
params
->
size
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
void
*
WINAPI
wrap_clEnqueueMapImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
*
image_row_pitch
,
size_t
*
image_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
)
static
NTSTATUS
wrap_clEnqueueMapImage
(
void
*
args
)
{
return
clEnqueueMapImage
(
command_queue
,
image
,
blocking_map
,
map_flags
,
origin
,
region
,
image_row_pitch
,
image_slice_pitch
,
num_events_in_wait_list
,
event_wait_list
,
event
,
errcode_ret
);
struct
clEnqueueMapImage_params
*
params
=
args
;
*
params
->
__retval
=
clEnqueueMapImage
(
params
->
command_queue
,
params
->
image
,
params
->
blocking_map
,
params
->
map_flags
,
params
->
origin
,
params
->
region
,
params
->
image_row_pitch
,
params
->
image_slice_pitch
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
static
cl_int
WINAPI
wrap_clEnqueueMarker
(
cl_command_queue
command_queue
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueMarker
(
void
*
args
)
{
return
clEnqueueMarker
(
command_queue
,
event
);
struct
clEnqueueMarker_params
*
params
=
args
;
return
clEnqueueMarker
(
params
->
command_queue
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueMarkerWithWaitList
(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueMarkerWithWaitList
(
void
*
args
)
{
return
clEnqueueMarkerWithWaitList
(
command_queue
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueMarkerWithWaitList_params
*
params
=
args
;
return
clEnqueueMarkerWithWaitList
(
params
->
command_queue
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueMigrateMemObjects
(
cl_command_queue
command_queue
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_objects
,
cl_mem_migration_flags
flags
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueMigrateMemObjects
(
void
*
args
)
{
return
clEnqueueMigrateMemObjects
(
command_queue
,
num_mem_objects
,
mem_objects
,
flags
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueMigrateMemObjects_params
*
params
=
args
;
return
clEnqueueMigrateMemObjects
(
params
->
command_queue
,
params
->
num_mem_objects
,
params
->
mem_objects
,
params
->
flags
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueNDRangeKernel
(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
work_dim
,
const
size_t
*
global_work_offset
,
const
size_t
*
global_work_size
,
const
size_t
*
local_work_size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueNDRangeKernel
(
void
*
args
)
{
return
clEnqueueNDRangeKernel
(
command_queue
,
kernel
,
work_dim
,
global_work_offset
,
global_work_size
,
local_work_size
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueNDRangeKernel_params
*
params
=
args
;
return
clEnqueueNDRangeKernel
(
params
->
command_queue
,
params
->
kernel
,
params
->
work_dim
,
params
->
global_work_offset
,
params
->
global_work_size
,
params
->
local_work_size
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueReadBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
size_t
offset
,
size_t
size
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueReadBuffer
(
void
*
args
)
{
return
clEnqueueReadBuffer
(
command_queue
,
buffer
,
blocking_read
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueReadBuffer_params
*
params
=
args
;
return
clEnqueueReadBuffer
(
params
->
command_queue
,
params
->
buffer
,
params
->
blocking_read
,
params
->
offset
,
params
->
size
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueReadBufferRect
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueReadBufferRect
(
void
*
args
)
{
return
clEnqueueReadBufferRect
(
command_queue
,
buffer
,
blocking_read
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueReadBufferRect_params
*
params
=
args
;
return
clEnqueueReadBufferRect
(
params
->
command_queue
,
params
->
buffer
,
params
->
blocking_read
,
params
->
buffer_origin
,
params
->
host_origin
,
params
->
region
,
params
->
buffer_row_pitch
,
params
->
buffer_slice_pitch
,
params
->
host_row_pitch
,
params
->
host_slice_pitch
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueReadImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_read
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
row_pitch
,
size_t
slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueReadImage
(
void
*
args
)
{
return
clEnqueueReadImage
(
command_queue
,
image
,
blocking_read
,
origin
,
region
,
row_pitch
,
slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueReadImage_params
*
params
=
args
;
return
clEnqueueReadImage
(
params
->
command_queue
,
params
->
image
,
params
->
blocking_read
,
params
->
origin
,
params
->
region
,
params
->
row_pitch
,
params
->
slice_pitch
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueTask
(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueTask
(
void
*
args
)
{
return
clEnqueueTask
(
command_queue
,
kernel
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueTask_params
*
params
=
args
;
return
clEnqueueTask
(
params
->
command_queue
,
params
->
kernel
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueUnmapMemObject
(
cl_command_queue
command_queue
,
cl_mem
memobj
,
void
*
mapped_ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueUnmapMemObject
(
void
*
args
)
{
return
clEnqueueUnmapMemObject
(
command_queue
,
memobj
,
mapped_ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueUnmapMemObject_params
*
params
=
args
;
return
clEnqueueUnmapMemObject
(
params
->
command_queue
,
params
->
memobj
,
params
->
mapped_ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueWaitForEvents
(
cl_command_queue
command_queue
,
cl_uint
num_events
,
const
cl_event
*
event_list
)
static
NTSTATUS
wrap_clEnqueueWaitForEvents
(
void
*
args
)
{
return
clEnqueueWaitForEvents
(
command_queue
,
num_events
,
event_list
);
struct
clEnqueueWaitForEvents_params
*
params
=
args
;
return
clEnqueueWaitForEvents
(
params
->
command_queue
,
params
->
num_events
,
params
->
event_list
);
}
static
cl_int
WINAPI
wrap_clEnqueueWriteBuffer
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
size_t
offset
,
size_t
size
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueWriteBuffer
(
void
*
args
)
{
return
clEnqueueWriteBuffer
(
command_queue
,
buffer
,
blocking_write
,
offset
,
size
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueWriteBuffer_params
*
params
=
args
;
return
clEnqueueWriteBuffer
(
params
->
command_queue
,
params
->
buffer
,
params
->
blocking_write
,
params
->
offset
,
params
->
size
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueWriteBufferRect
(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueWriteBufferRect
(
void
*
args
)
{
return
clEnqueueWriteBufferRect
(
command_queue
,
buffer
,
blocking_write
,
buffer_origin
,
host_origin
,
region
,
buffer_row_pitch
,
buffer_slice_pitch
,
host_row_pitch
,
host_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueWriteBufferRect_params
*
params
=
args
;
return
clEnqueueWriteBufferRect
(
params
->
command_queue
,
params
->
buffer
,
params
->
blocking_write
,
params
->
buffer_origin
,
params
->
host_origin
,
params
->
region
,
params
->
buffer_row_pitch
,
params
->
buffer_slice_pitch
,
params
->
host_row_pitch
,
params
->
host_slice_pitch
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clEnqueueWriteImage
(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_write
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
input_row_pitch
,
size_t
input_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
static
NTSTATUS
wrap_clEnqueueWriteImage
(
void
*
args
)
{
return
clEnqueueWriteImage
(
command_queue
,
image
,
blocking_write
,
origin
,
region
,
input_row_pitch
,
input_slice_pitch
,
ptr
,
num_events_in_wait_list
,
event_wait_list
,
event
);
struct
clEnqueueWriteImage_params
*
params
=
args
;
return
clEnqueueWriteImage
(
params
->
command_queue
,
params
->
image
,
params
->
blocking_write
,
params
->
origin
,
params
->
region
,
params
->
input_row_pitch
,
params
->
input_slice_pitch
,
params
->
ptr
,
params
->
num_events_in_wait_list
,
params
->
event_wait_list
,
params
->
event
);
}
static
cl_int
WINAPI
wrap_clFinish
(
cl_command_queue
command_queue
)
static
NTSTATUS
wrap_clFinish
(
void
*
args
)
{
return
clFinish
(
command_queue
);
struct
clFinish_params
*
params
=
args
;
return
clFinish
(
params
->
command_queue
);
}
static
cl_int
WINAPI
wrap_clFlush
(
cl_command_queue
command_queue
)
static
NTSTATUS
wrap_clFlush
(
void
*
args
)
{
return
clFlush
(
command_queue
);
struct
clFlush_params
*
params
=
args
;
return
clFlush
(
params
->
command_queue
);
}
static
cl_int
WINAPI
wrap_clGetCommandQueueInfo
(
cl_command_queue
command_queue
,
cl_command_queue_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetCommandQueueInfo
(
void
*
args
)
{
return
clGetCommandQueueInfo
(
command_queue
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetCommandQueueInfo_params
*
params
=
args
;
return
clGetCommandQueueInfo
(
params
->
command_queue
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetContextInfo
(
cl_context
context
,
cl_context_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetContextInfo
(
void
*
args
)
{
return
clGetContextInfo
(
context
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetContextInfo_params
*
params
=
args
;
return
clGetContextInfo
(
params
->
context
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetDeviceIDs
(
cl_platform_id
platform
,
cl_device_type
device_type
,
cl_uint
num_entries
,
cl_device_id
*
devices
,
cl_uint
*
num_device
s
)
static
NTSTATUS
wrap_clGetDeviceIDs
(
void
*
arg
s
)
{
return
clGetDeviceIDs
(
platform
,
device_type
,
num_entries
,
devices
,
num_devices
);
struct
clGetDeviceIDs_params
*
params
=
args
;
return
clGetDeviceIDs
(
params
->
platform
,
params
->
device_type
,
params
->
num_entries
,
params
->
devices
,
params
->
num_devices
);
}
static
cl_int
WINAPI
wrap_clGetDeviceInfo
(
cl_device_id
device
,
cl_device_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetDeviceInfo
(
void
*
args
)
{
return
clGetDeviceInfo
(
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetDeviceInfo_params
*
params
=
args
;
return
clGetDeviceInfo
(
params
->
device
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetEventInfo
(
cl_event
event
,
cl_event_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetEventInfo
(
void
*
args
)
{
return
clGetEventInfo
(
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetEventInfo_params
*
params
=
args
;
return
clGetEventInfo
(
params
->
event
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetEventProfilingInfo
(
cl_event
event
,
cl_profiling_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetEventProfilingInfo
(
void
*
args
)
{
return
clGetEventProfilingInfo
(
event
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetEventProfilingInfo_params
*
params
=
args
;
return
clGetEventProfilingInfo
(
params
->
event
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetImageInfo
(
cl_mem
image
,
cl_image_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetImageInfo
(
void
*
args
)
{
return
clGetImageInfo
(
image
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetImageInfo_params
*
params
=
args
;
return
clGetImageInfo
(
params
->
image
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetKernelArgInfo
(
cl_kernel
kernel
,
cl_uint
arg_index
,
cl_kernel_arg_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetKernelArgInfo
(
void
*
args
)
{
return
clGetKernelArgInfo
(
kernel
,
arg_index
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetKernelArgInfo_params
*
params
=
args
;
return
clGetKernelArgInfo
(
params
->
kernel
,
params
->
arg_index
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetKernelInfo
(
cl_kernel
kernel
,
cl_kernel_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetKernelInfo
(
void
*
args
)
{
return
clGetKernelInfo
(
kernel
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetKernelInfo_params
*
params
=
args
;
return
clGetKernelInfo
(
params
->
kernel
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetKernelWorkGroupInfo
(
cl_kernel
kernel
,
cl_device_id
device
,
cl_kernel_work_group_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetKernelWorkGroupInfo
(
void
*
args
)
{
return
clGetKernelWorkGroupInfo
(
kernel
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetKernelWorkGroupInfo_params
*
params
=
args
;
return
clGetKernelWorkGroupInfo
(
params
->
kernel
,
params
->
device
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetMemObjectInfo
(
cl_mem
memobj
,
cl_mem_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetMemObjectInfo
(
void
*
args
)
{
return
clGetMemObjectInfo
(
memobj
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetMemObjectInfo_params
*
params
=
args
;
return
clGetMemObjectInfo
(
params
->
memobj
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetPlatformIDs
(
cl_uint
num_entries
,
cl_platform_id
*
platforms
,
cl_uint
*
num_platform
s
)
static
NTSTATUS
wrap_clGetPlatformIDs
(
void
*
arg
s
)
{
return
clGetPlatformIDs
(
num_entries
,
platforms
,
num_platforms
);
struct
clGetPlatformIDs_params
*
params
=
args
;
return
clGetPlatformIDs
(
params
->
num_entries
,
params
->
platforms
,
params
->
num_platforms
);
}
static
cl_int
WINAPI
wrap_clGetPlatformInfo
(
cl_platform_id
platform
,
cl_platform_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetPlatformInfo
(
void
*
args
)
{
return
clGetPlatformInfo
(
platform
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetPlatformInfo_params
*
params
=
args
;
return
clGetPlatformInfo
(
params
->
platform
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetProgramBuildInfo
(
cl_program
program
,
cl_device_id
device
,
cl_program_build_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetProgramBuildInfo
(
void
*
args
)
{
return
clGetProgramBuildInfo
(
program
,
device
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetProgramBuildInfo_params
*
params
=
args
;
return
clGetProgramBuildInfo
(
params
->
program
,
params
->
device
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetProgramInfo
(
cl_program
program
,
cl_program_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetProgramInfo
(
void
*
args
)
{
return
clGetProgramInfo
(
program
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetProgramInfo_params
*
params
=
args
;
return
clGetProgramInfo
(
params
->
program
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetSamplerInfo
(
cl_sampler
sampler
,
cl_sampler_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
)
static
NTSTATUS
wrap_clGetSamplerInfo
(
void
*
args
)
{
return
clGetSamplerInfo
(
sampler
,
param_name
,
param_value_size
,
param_value
,
param_value_size_ret
);
struct
clGetSamplerInfo_params
*
params
=
args
;
return
clGetSamplerInfo
(
params
->
sampler
,
params
->
param_name
,
params
->
param_value_size
,
params
->
param_value
,
params
->
param_value_size_ret
);
}
static
cl_int
WINAPI
wrap_clGetSupportedImageFormats
(
cl_context
context
,
cl_mem_flags
flags
,
cl_mem_object_type
image_type
,
cl_uint
num_entries
,
cl_image_format
*
image_formats
,
cl_uint
*
num_image_format
s
)
static
NTSTATUS
wrap_clGetSupportedImageFormats
(
void
*
arg
s
)
{
return
clGetSupportedImageFormats
(
context
,
flags
,
image_type
,
num_entries
,
image_formats
,
num_image_formats
);
struct
clGetSupportedImageFormats_params
*
params
=
args
;
return
clGetSupportedImageFormats
(
params
->
context
,
params
->
flags
,
params
->
image_type
,
params
->
num_entries
,
params
->
image_formats
,
params
->
num_image_formats
);
}
static
cl_int
WINAPI
wrap_clReleaseCommandQueue
(
cl_command_queue
command_queue
)
static
NTSTATUS
wrap_clReleaseCommandQueue
(
void
*
args
)
{
return
clReleaseCommandQueue
(
command_queue
);
struct
clReleaseCommandQueue_params
*
params
=
args
;
return
clReleaseCommandQueue
(
params
->
command_queue
);
}
static
cl_int
WINAPI
wrap_clReleaseContext
(
cl_context
context
)
static
NTSTATUS
wrap_clReleaseContext
(
void
*
args
)
{
return
clReleaseContext
(
context
);
struct
clReleaseContext_params
*
params
=
args
;
return
clReleaseContext
(
params
->
context
);
}
static
cl_int
WINAPI
wrap_clReleaseDevice
(
cl_device_id
device
)
static
NTSTATUS
wrap_clReleaseDevice
(
void
*
args
)
{
return
clReleaseDevice
(
device
);
struct
clReleaseDevice_params
*
params
=
args
;
return
clReleaseDevice
(
params
->
device
);
}
static
cl_int
WINAPI
wrap_clReleaseEvent
(
cl_event
event
)
static
NTSTATUS
wrap_clReleaseEvent
(
void
*
args
)
{
return
clReleaseEvent
(
event
);
struct
clReleaseEvent_params
*
params
=
args
;
return
clReleaseEvent
(
params
->
event
);
}
static
cl_int
WINAPI
wrap_clReleaseKernel
(
cl_kernel
kernel
)
static
NTSTATUS
wrap_clReleaseKernel
(
void
*
args
)
{
return
clReleaseKernel
(
kernel
);
struct
clReleaseKernel_params
*
params
=
args
;
return
clReleaseKernel
(
params
->
kernel
);
}
static
cl_int
WINAPI
wrap_clReleaseMemObject
(
cl_mem
memobj
)
static
NTSTATUS
wrap_clReleaseMemObject
(
void
*
args
)
{
return
clReleaseMemObject
(
memobj
);
struct
clReleaseMemObject_params
*
params
=
args
;
return
clReleaseMemObject
(
params
->
memobj
);
}
static
cl_int
WINAPI
wrap_clReleaseProgram
(
cl_program
program
)
static
NTSTATUS
wrap_clReleaseProgram
(
void
*
args
)
{
return
clReleaseProgram
(
program
);
struct
clReleaseProgram_params
*
params
=
args
;
return
clReleaseProgram
(
params
->
program
);
}
static
cl_int
WINAPI
wrap_clReleaseSampler
(
cl_sampler
sampler
)
static
NTSTATUS
wrap_clReleaseSampler
(
void
*
args
)
{
return
clReleaseSampler
(
sampler
);
struct
clReleaseSampler_params
*
params
=
args
;
return
clReleaseSampler
(
params
->
sampler
);
}
static
cl_int
WINAPI
wrap_clRetainCommandQueue
(
cl_command_queue
command_queue
)
static
NTSTATUS
wrap_clRetainCommandQueue
(
void
*
args
)
{
return
clRetainCommandQueue
(
command_queue
);
struct
clRetainCommandQueue_params
*
params
=
args
;
return
clRetainCommandQueue
(
params
->
command_queue
);
}
static
cl_int
WINAPI
wrap_clRetainContext
(
cl_context
context
)
static
NTSTATUS
wrap_clRetainContext
(
void
*
args
)
{
return
clRetainContext
(
context
);
struct
clRetainContext_params
*
params
=
args
;
return
clRetainContext
(
params
->
context
);
}
static
cl_int
WINAPI
wrap_clRetainDevice
(
cl_device_id
device
)
static
NTSTATUS
wrap_clRetainDevice
(
void
*
args
)
{
return
clRetainDevice
(
device
);
struct
clRetainDevice_params
*
params
=
args
;
return
clRetainDevice
(
params
->
device
);
}
static
cl_int
WINAPI
wrap_clRetainEvent
(
cl_event
event
)
static
NTSTATUS
wrap_clRetainEvent
(
void
*
args
)
{
return
clRetainEvent
(
event
);
struct
clRetainEvent_params
*
params
=
args
;
return
clRetainEvent
(
params
->
event
);
}
static
cl_int
WINAPI
wrap_clRetainKernel
(
cl_kernel
kernel
)
static
NTSTATUS
wrap_clRetainKernel
(
void
*
args
)
{
return
clRetainKernel
(
kernel
);
struct
clRetainKernel_params
*
params
=
args
;
return
clRetainKernel
(
params
->
kernel
);
}
static
cl_int
WINAPI
wrap_clRetainMemObject
(
cl_mem
memobj
)
static
NTSTATUS
wrap_clRetainMemObject
(
void
*
args
)
{
return
clRetainMemObject
(
memobj
);
struct
clRetainMemObject_params
*
params
=
args
;
return
clRetainMemObject
(
params
->
memobj
);
}
static
cl_int
WINAPI
wrap_clRetainProgram
(
cl_program
program
)
static
NTSTATUS
wrap_clRetainProgram
(
void
*
args
)
{
return
clRetainProgram
(
program
);
struct
clRetainProgram_params
*
params
=
args
;
return
clRetainProgram
(
params
->
program
);
}
static
cl_int
WINAPI
wrap_clRetainSampler
(
cl_sampler
sampler
)
static
NTSTATUS
wrap_clRetainSampler
(
void
*
args
)
{
return
clRetainSampler
(
sampler
);
struct
clRetainSampler_params
*
params
=
args
;
return
clRetainSampler
(
params
->
sampler
);
}
static
cl_int
WINAPI
wrap_clSetKernelArg
(
cl_kernel
kernel
,
cl_uint
arg_index
,
size_t
arg_size
,
const
void
*
arg_value
)
static
NTSTATUS
wrap_clSetKernelArg
(
void
*
args
)
{
return
clSetKernelArg
(
kernel
,
arg_index
,
arg_size
,
arg_value
);
struct
clSetKernelArg_params
*
params
=
args
;
return
clSetKernelArg
(
params
->
kernel
,
params
->
arg_index
,
params
->
arg_size
,
params
->
arg_value
);
}
static
cl_int
WINAPI
wrap_clSetUserEventStatus
(
cl_event
event
,
cl_int
execution_statu
s
)
static
NTSTATUS
wrap_clSetUserEventStatus
(
void
*
arg
s
)
{
return
clSetUserEventStatus
(
event
,
execution_status
);
struct
clSetUserEventStatus_params
*
params
=
args
;
return
clSetUserEventStatus
(
params
->
event
,
params
->
execution_status
);
}
static
cl_int
WINAPI
wrap_clUnloadCompiler
(
void
)
static
NTSTATUS
wrap_clUnloadCompiler
(
void
*
args
)
{
return
clUnloadCompiler
();
}
static
cl_int
WINAPI
wrap_clUnloadPlatformCompiler
(
cl_platform_id
platform
)
static
NTSTATUS
wrap_clUnloadPlatformCompiler
(
void
*
args
)
{
return
clUnloadPlatformCompiler
(
platform
);
struct
clUnloadPlatformCompiler_params
*
params
=
args
;
return
clUnloadPlatformCompiler
(
params
->
platform
);
}
static
cl_int
WINAPI
wrap_clWaitForEvents
(
cl_uint
num_events
,
const
cl_event
*
event_list
)
static
NTSTATUS
wrap_clWaitForEvents
(
void
*
args
)
{
return
clWaitForEvents
(
num_events
,
event_list
);
struct
clWaitForEvents_params
*
params
=
args
;
return
clWaitForEvents
(
params
->
num_events
,
params
->
event_list
);
}
const
struct
opencl_funcs
funcs
=
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
wrap_clBuildProgram
,
wrap_clCompileProgram
,
...
...
dlls/opencl/unix_wrappers.c
View file @
37c40316
...
...
@@ -26,81 +26,65 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
opencl
);
cl_int
WINAPI
wrap_clBuildProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
NTSTATUS
wrap_clBuildProgram
(
void
*
args
)
{
if
(
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
return
clBuildProgram
(
program
,
num_devices
,
device_list
,
options
,
NULL
,
NULL
);
struct
clBuildProgram_params
*
params
=
args
;
if
(
params
->
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
return
clBuildProgram
(
params
->
program
,
params
->
num_devices
,
params
->
device_list
,
params
->
options
,
NULL
,
NULL
);
}
cl_context
WINAPI
wrap_clCreateContext
(
const
cl_context_properties
*
properties
,
cl_uint
num_devices
,
const
cl_device_id
*
devices
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
NTSTATUS
wrap_clCreateContext
(
void
*
args
)
{
if
(
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
return
clCreateContext
(
properties
,
num_devices
,
devices
,
NULL
,
NULL
,
errcode_ret
);
struct
clCreateContext_params
*
params
=
args
;
if
(
params
->
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
*
params
->
__retval
=
clCreateContext
(
params
->
properties
,
params
->
num_devices
,
params
->
devices
,
NULL
,
NULL
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
cl_context
WINAPI
wrap_clCreateContextFromType
(
const
cl_context_properties
*
properties
,
cl_device_type
device_type
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
NTSTATUS
wrap_clCreateContextFromType
(
void
*
args
)
{
if
(
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
return
clCreateContextFromType
(
properties
,
device_type
,
NULL
,
NULL
,
errcode_ret
);
struct
clCreateContextFromType_params
*
params
=
args
;
if
(
params
->
pfn_notify
)
FIXME
(
"notify callback not supported
\n
"
);
*
params
->
__retval
=
clCreateContextFromType
(
params
->
properties
,
params
->
device_type
,
NULL
,
NULL
,
params
->
errcode_ret
);
return
STATUS_SUCCESS
;
}
cl_int
WINAPI
wrap_clEnqueueNativeKernel
(
cl_command_queue
command_queue
,
void
(
WINAPI
*
user_func
)(
void
*
),
void
*
args
,
size_t
cb_args
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_list
,
const
void
**
args_mem_loc
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
)
NTSTATUS
wrap_clEnqueueNativeKernel
(
void
*
args
)
{
/* we have no clear way to wrap user_func */
FIXME
(
"not implemented
\n
"
);
return
CL_INVALID_OPERATION
;
}
cl_int
WINAPI
wrap_clSetEventCallback
(
cl_event
event
,
cl_int
type
,
void
(
WINAPI
*
pfn_notify
)(
cl_event
,
cl_int
,
void
*
),
void
*
user_data
)
NTSTATUS
wrap_clSetEventCallback
(
void
*
args
)
{
FIXME
(
"not yet implemented
\n
"
);
return
CL_INVALID_OPERATION
;
}
cl_int
WINAPI
wrap_clSetMemObjectDestructorCallback
(
cl_mem
memobj
,
void
(
WINAPI
*
pfn_notify
)(
cl_mem
,
void
*
),
void
*
user_data
)
NTSTATUS
wrap_clSetMemObjectDestructorCallback
(
void
*
args
)
{
FIXME
(
"not yet implemented
\n
"
);
return
CL_INVALID_OPERATION
;
}
cl_int
WINAPI
wrap_clCompileProgram
(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_headers
,
const
cl_program
*
input_headers
,
const
char
**
header_include_names
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
)
NTSTATUS
wrap_clCompileProgram
(
void
*
args
)
{
FIXME
(
"not yet implemented
\n
"
);
return
CL_INVALID_OPERATION
;
}
cl_program
WINAPI
wrap_clLinkProgram
(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_programs
,
const
cl_program
*
input_programs
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
)
NTSTATUS
wrap_clLinkProgram
(
void
*
args
)
{
FIXME
(
"not yet implemented
\n
"
);
*
errcode_ret
=
CL_INVALID_OPERATION
;
return
NULL
;
}
struct
clLinkProgram_params
*
params
=
args
;
NTSTATUS
CDECL
__wine_init_unix_lib
(
HMODULE
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
)
{
if
(
reason
!=
DLL_PROCESS_ATTACH
)
return
STATUS_SUCCESS
;
*
(
const
struct
opencl_funcs
**
)
ptr_out
=
&
funcs
;
FIXME
(
"not yet implemented
\n
"
);
*
params
->
errcode_ret
=
CL_INVALID_OPERATION
;
return
STATUS_SUCCESS
;
}
dlls/opencl/unixlib.h
View file @
37c40316
/* Automatically generated from OpenCL registry files; DO NOT EDIT! */
struct
opencl_funcs
{
cl_int
(
WINAPI
*
pclBuildProgram
)(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
);
cl_int
(
WINAPI
*
pclCompileProgram
)(
cl_program
program
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_headers
,
const
cl_program
*
input_headers
,
const
char
**
header_include_names
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
);
cl_mem
(
WINAPI
*
pclCreateBuffer
)(
cl_context
context
,
cl_mem_flags
flags
,
size_t
size
,
void
*
host_ptr
,
cl_int
*
errcode_ret
);
cl_command_queue
(
WINAPI
*
pclCreateCommandQueue
)(
cl_context
context
,
cl_device_id
device
,
cl_command_queue_properties
properties
,
cl_int
*
errcode_ret
);
cl_context
(
WINAPI
*
pclCreateContext
)(
const
cl_context_properties
*
properties
,
cl_uint
num_devices
,
const
cl_device_id
*
devices
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
);
cl_context
(
WINAPI
*
pclCreateContextFromType
)(
const
cl_context_properties
*
properties
,
cl_device_type
device_type
,
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
);
cl_mem
(
WINAPI
*
pclCreateImage
)(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
const
cl_image_desc
*
image_desc
,
void
*
host_ptr
,
cl_int
*
errcode_ret
);
cl_mem
(
WINAPI
*
pclCreateImage2D
)(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_row_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
);
cl_mem
(
WINAPI
*
pclCreateImage3D
)(
cl_context
context
,
cl_mem_flags
flags
,
const
cl_image_format
*
image_format
,
size_t
image_width
,
size_t
image_height
,
size_t
image_depth
,
size_t
image_row_pitch
,
size_t
image_slice_pitch
,
void
*
host_ptr
,
cl_int
*
errcode_ret
);
cl_kernel
(
WINAPI
*
pclCreateKernel
)(
cl_program
program
,
const
char
*
kernel_name
,
cl_int
*
errcode_ret
);
cl_int
(
WINAPI
*
pclCreateKernelsInProgram
)(
cl_program
program
,
cl_uint
num_kernels
,
cl_kernel
*
kernels
,
cl_uint
*
num_kernels_ret
);
cl_program
(
WINAPI
*
pclCreateProgramWithBinary
)(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
size_t
*
lengths
,
const
unsigned
char
**
binaries
,
cl_int
*
binary_status
,
cl_int
*
errcode_ret
);
cl_program
(
WINAPI
*
pclCreateProgramWithBuiltInKernels
)(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
kernel_names
,
cl_int
*
errcode_ret
);
cl_program
(
WINAPI
*
pclCreateProgramWithSource
)(
cl_context
context
,
cl_uint
count
,
const
char
**
strings
,
const
size_t
*
lengths
,
cl_int
*
errcode_ret
);
cl_sampler
(
WINAPI
*
pclCreateSampler
)(
cl_context
context
,
cl_bool
normalized_coords
,
cl_addressing_mode
addressing_mode
,
cl_filter_mode
filter_mode
,
cl_int
*
errcode_ret
);
cl_mem
(
WINAPI
*
pclCreateSubBuffer
)(
cl_mem
buffer
,
cl_mem_flags
flags
,
cl_buffer_create_type
buffer_create_type
,
const
void
*
buffer_create_info
,
cl_int
*
errcode_ret
);
cl_int
(
WINAPI
*
pclCreateSubDevices
)(
cl_device_id
in_device
,
const
cl_device_partition_property
*
properties
,
cl_uint
num_devices
,
cl_device_id
*
out_devices
,
cl_uint
*
num_devices_ret
);
cl_event
(
WINAPI
*
pclCreateUserEvent
)(
cl_context
context
,
cl_int
*
errcode_ret
);
cl_int
(
WINAPI
*
pclEnqueueBarrier
)(
cl_command_queue
command_queue
);
cl_int
(
WINAPI
*
pclEnqueueBarrierWithWaitList
)(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueCopyBuffer
)(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
size_t
src_offset
,
size_t
dst_offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueCopyBufferRect
)(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
size_t
src_row_pitch
,
size_t
src_slice_pitch
,
size_t
dst_row_pitch
,
size_t
dst_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueCopyBufferToImage
)(
cl_command_queue
command_queue
,
cl_mem
src_buffer
,
cl_mem
dst_image
,
size_t
src_offset
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueCopyImage
)(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_image
,
const
size_t
*
src_origin
,
const
size_t
*
dst_origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueCopyImageToBuffer
)(
cl_command_queue
command_queue
,
cl_mem
src_image
,
cl_mem
dst_buffer
,
const
size_t
*
src_origin
,
const
size_t
*
region
,
size_t
dst_offset
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueFillBuffer
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
const
void
*
pattern
,
size_t
pattern_size
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueFillImage
)(
cl_command_queue
command_queue
,
cl_mem
image
,
const
void
*
fill_color
,
const
size_t
*
origin
,
const
size_t
*
region
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
void
*
(
WINAPI
*
pclEnqueueMapBuffer
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
size_t
offset
,
size_t
size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
);
void
*
(
WINAPI
*
pclEnqueueMapImage
)(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_map
,
cl_map_flags
map_flags
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
*
image_row_pitch
,
size_t
*
image_slice_pitch
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
,
cl_int
*
errcode_ret
);
cl_int
(
WINAPI
*
pclEnqueueMarker
)(
cl_command_queue
command_queue
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueMarkerWithWaitList
)(
cl_command_queue
command_queue
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueMigrateMemObjects
)(
cl_command_queue
command_queue
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_objects
,
cl_mem_migration_flags
flags
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueNDRangeKernel
)(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
work_dim
,
const
size_t
*
global_work_offset
,
const
size_t
*
global_work_size
,
const
size_t
*
local_work_size
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueNativeKernel
)(
cl_command_queue
command_queue
,
void
(
WINAPI
*
user_func
)(
void
*
),
void
*
args
,
size_t
cb_args
,
cl_uint
num_mem_objects
,
const
cl_mem
*
mem_list
,
const
void
**
args_mem_loc
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueReadBuffer
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
size_t
offset
,
size_t
size
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueReadBufferRect
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_read
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueReadImage
)(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_read
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
row_pitch
,
size_t
slice_pitch
,
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueTask
)(
cl_command_queue
command_queue
,
cl_kernel
kernel
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueUnmapMemObject
)(
cl_command_queue
command_queue
,
cl_mem
memobj
,
void
*
mapped_ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueWaitForEvents
)(
cl_command_queue
command_queue
,
cl_uint
num_events
,
const
cl_event
*
event_list
);
cl_int
(
WINAPI
*
pclEnqueueWriteBuffer
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
size_t
offset
,
size_t
size
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueWriteBufferRect
)(
cl_command_queue
command_queue
,
cl_mem
buffer
,
cl_bool
blocking_write
,
const
size_t
*
buffer_origin
,
const
size_t
*
host_origin
,
const
size_t
*
region
,
size_t
buffer_row_pitch
,
size_t
buffer_slice_pitch
,
size_t
host_row_pitch
,
size_t
host_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclEnqueueWriteImage
)(
cl_command_queue
command_queue
,
cl_mem
image
,
cl_bool
blocking_write
,
const
size_t
*
origin
,
const
size_t
*
region
,
size_t
input_row_pitch
,
size_t
input_slice_pitch
,
const
void
*
ptr
,
cl_uint
num_events_in_wait_list
,
const
cl_event
*
event_wait_list
,
cl_event
*
event
);
cl_int
(
WINAPI
*
pclFinish
)(
cl_command_queue
command_queue
);
cl_int
(
WINAPI
*
pclFlush
)(
cl_command_queue
command_queue
);
cl_int
(
WINAPI
*
pclGetCommandQueueInfo
)(
cl_command_queue
command_queue
,
cl_command_queue_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetContextInfo
)(
cl_context
context
,
cl_context_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetDeviceIDs
)(
cl_platform_id
platform
,
cl_device_type
device_type
,
cl_uint
num_entries
,
cl_device_id
*
devices
,
cl_uint
*
num_devices
);
cl_int
(
WINAPI
*
pclGetDeviceInfo
)(
cl_device_id
device
,
cl_device_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetEventInfo
)(
cl_event
event
,
cl_event_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetEventProfilingInfo
)(
cl_event
event
,
cl_profiling_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetImageInfo
)(
cl_mem
image
,
cl_image_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetKernelArgInfo
)(
cl_kernel
kernel
,
cl_uint
arg_index
,
cl_kernel_arg_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetKernelInfo
)(
cl_kernel
kernel
,
cl_kernel_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetKernelWorkGroupInfo
)(
cl_kernel
kernel
,
cl_device_id
device
,
cl_kernel_work_group_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetMemObjectInfo
)(
cl_mem
memobj
,
cl_mem_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetPlatformIDs
)(
cl_uint
num_entries
,
cl_platform_id
*
platforms
,
cl_uint
*
num_platforms
);
cl_int
(
WINAPI
*
pclGetPlatformInfo
)(
cl_platform_id
platform
,
cl_platform_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetProgramBuildInfo
)(
cl_program
program
,
cl_device_id
device
,
cl_program_build_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetProgramInfo
)(
cl_program
program
,
cl_program_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetSamplerInfo
)(
cl_sampler
sampler
,
cl_sampler_info
param_name
,
size_t
param_value_size
,
void
*
param_value
,
size_t
*
param_value_size_ret
);
cl_int
(
WINAPI
*
pclGetSupportedImageFormats
)(
cl_context
context
,
cl_mem_flags
flags
,
cl_mem_object_type
image_type
,
cl_uint
num_entries
,
cl_image_format
*
image_formats
,
cl_uint
*
num_image_formats
);
cl_program
(
WINAPI
*
pclLinkProgram
)(
cl_context
context
,
cl_uint
num_devices
,
const
cl_device_id
*
device_list
,
const
char
*
options
,
cl_uint
num_input_programs
,
const
cl_program
*
input_programs
,
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
),
void
*
user_data
,
cl_int
*
errcode_ret
);
cl_int
(
WINAPI
*
pclReleaseCommandQueue
)(
cl_command_queue
command_queue
);
cl_int
(
WINAPI
*
pclReleaseContext
)(
cl_context
context
);
cl_int
(
WINAPI
*
pclReleaseDevice
)(
cl_device_id
device
);
cl_int
(
WINAPI
*
pclReleaseEvent
)(
cl_event
event
);
cl_int
(
WINAPI
*
pclReleaseKernel
)(
cl_kernel
kernel
);
cl_int
(
WINAPI
*
pclReleaseMemObject
)(
cl_mem
memobj
);
cl_int
(
WINAPI
*
pclReleaseProgram
)(
cl_program
program
);
cl_int
(
WINAPI
*
pclReleaseSampler
)(
cl_sampler
sampler
);
cl_int
(
WINAPI
*
pclRetainCommandQueue
)(
cl_command_queue
command_queue
);
cl_int
(
WINAPI
*
pclRetainContext
)(
cl_context
context
);
cl_int
(
WINAPI
*
pclRetainDevice
)(
cl_device_id
device
);
cl_int
(
WINAPI
*
pclRetainEvent
)(
cl_event
event
);
cl_int
(
WINAPI
*
pclRetainKernel
)(
cl_kernel
kernel
);
cl_int
(
WINAPI
*
pclRetainMemObject
)(
cl_mem
memobj
);
cl_int
(
WINAPI
*
pclRetainProgram
)(
cl_program
program
);
cl_int
(
WINAPI
*
pclRetainSampler
)(
cl_sampler
sampler
);
cl_int
(
WINAPI
*
pclSetEventCallback
)(
cl_event
event
,
cl_int
command_exec_callback_type
,
void
(
WINAPI
*
pfn_notify
)(
cl_event
event
,
cl_int
event_command_status
,
void
*
user_data
),
void
*
user_data
);
cl_int
(
WINAPI
*
pclSetKernelArg
)(
cl_kernel
kernel
,
cl_uint
arg_index
,
size_t
arg_size
,
const
void
*
arg_value
);
cl_int
(
WINAPI
*
pclSetMemObjectDestructorCallback
)(
cl_mem
memobj
,
void
(
WINAPI
*
pfn_notify
)(
cl_mem
memobj
,
void
*
user_data
),
void
*
user_data
);
cl_int
(
WINAPI
*
pclSetUserEventStatus
)(
cl_event
event
,
cl_int
execution_status
);
cl_int
(
WINAPI
*
pclUnloadCompiler
)(
void
);
cl_int
(
WINAPI
*
pclUnloadPlatformCompiler
)(
cl_platform_id
platform
);
cl_int
(
WINAPI
*
pclWaitForEvents
)(
cl_uint
num_events
,
const
cl_event
*
event_list
);
};
extern
const
struct
opencl_funcs
*
opencl_funcs
;
struct
clBuildProgram_params
{
cl_program
program
;
cl_uint
num_devices
;
const
cl_device_id
*
device_list
;
const
char
*
options
;
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
);
void
*
user_data
;
};
struct
clCompileProgram_params
{
cl_program
program
;
cl_uint
num_devices
;
const
cl_device_id
*
device_list
;
const
char
*
options
;
cl_uint
num_input_headers
;
const
cl_program
*
input_headers
;
const
char
**
header_include_names
;
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
);
void
*
user_data
;
};
struct
clCreateBuffer_params
{
cl_mem
*
__retval
;
cl_context
context
;
cl_mem_flags
flags
;
size_t
size
;
void
*
host_ptr
;
cl_int
*
errcode_ret
;
};
struct
clCreateCommandQueue_params
{
cl_command_queue
*
__retval
;
cl_context
context
;
cl_device_id
device
;
cl_command_queue_properties
properties
;
cl_int
*
errcode_ret
;
};
struct
clCreateContext_params
{
cl_context
*
__retval
;
const
cl_context_properties
*
properties
;
cl_uint
num_devices
;
const
cl_device_id
*
devices
;
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
);
void
*
user_data
;
cl_int
*
errcode_ret
;
};
struct
clCreateContextFromType_params
{
cl_context
*
__retval
;
const
cl_context_properties
*
properties
;
cl_device_type
device_type
;
void
(
WINAPI
*
pfn_notify
)(
const
char
*
errinfo
,
const
void
*
private_info
,
size_t
cb
,
void
*
user_data
);
void
*
user_data
;
cl_int
*
errcode_ret
;
};
struct
clCreateImage_params
{
cl_mem
*
__retval
;
cl_context
context
;
cl_mem_flags
flags
;
const
cl_image_format
*
image_format
;
const
cl_image_desc
*
image_desc
;
void
*
host_ptr
;
cl_int
*
errcode_ret
;
};
struct
clCreateImage2D_params
{
cl_mem
*
__retval
;
cl_context
context
;
cl_mem_flags
flags
;
const
cl_image_format
*
image_format
;
size_t
image_width
;
size_t
image_height
;
size_t
image_row_pitch
;
void
*
host_ptr
;
cl_int
*
errcode_ret
;
};
struct
clCreateImage3D_params
{
cl_mem
*
__retval
;
cl_context
context
;
cl_mem_flags
flags
;
const
cl_image_format
*
image_format
;
size_t
image_width
;
size_t
image_height
;
size_t
image_depth
;
size_t
image_row_pitch
;
size_t
image_slice_pitch
;
void
*
host_ptr
;
cl_int
*
errcode_ret
;
};
struct
clCreateKernel_params
{
cl_kernel
*
__retval
;
cl_program
program
;
const
char
*
kernel_name
;
cl_int
*
errcode_ret
;
};
struct
clCreateKernelsInProgram_params
{
cl_program
program
;
cl_uint
num_kernels
;
cl_kernel
*
kernels
;
cl_uint
*
num_kernels_ret
;
};
struct
clCreateProgramWithBinary_params
{
cl_program
*
__retval
;
cl_context
context
;
cl_uint
num_devices
;
const
cl_device_id
*
device_list
;
const
size_t
*
lengths
;
const
unsigned
char
**
binaries
;
cl_int
*
binary_status
;
cl_int
*
errcode_ret
;
};
struct
clCreateProgramWithBuiltInKernels_params
{
cl_program
*
__retval
;
cl_context
context
;
cl_uint
num_devices
;
const
cl_device_id
*
device_list
;
const
char
*
kernel_names
;
cl_int
*
errcode_ret
;
};
struct
clCreateProgramWithSource_params
{
cl_program
*
__retval
;
cl_context
context
;
cl_uint
count
;
const
char
**
strings
;
const
size_t
*
lengths
;
cl_int
*
errcode_ret
;
};
struct
clCreateSampler_params
{
cl_sampler
*
__retval
;
cl_context
context
;
cl_bool
normalized_coords
;
cl_addressing_mode
addressing_mode
;
cl_filter_mode
filter_mode
;
cl_int
*
errcode_ret
;
};
struct
clCreateSubBuffer_params
{
cl_mem
*
__retval
;
cl_mem
buffer
;
cl_mem_flags
flags
;
cl_buffer_create_type
buffer_create_type
;
const
void
*
buffer_create_info
;
cl_int
*
errcode_ret
;
};
struct
clCreateSubDevices_params
{
cl_device_id
in_device
;
const
cl_device_partition_property
*
properties
;
cl_uint
num_devices
;
cl_device_id
*
out_devices
;
cl_uint
*
num_devices_ret
;
};
struct
clCreateUserEvent_params
{
cl_event
*
__retval
;
cl_context
context
;
cl_int
*
errcode_ret
;
};
struct
clEnqueueBarrier_params
{
cl_command_queue
command_queue
;
};
struct
clEnqueueBarrierWithWaitList_params
{
cl_command_queue
command_queue
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueCopyBuffer_params
{
cl_command_queue
command_queue
;
cl_mem
src_buffer
;
cl_mem
dst_buffer
;
size_t
src_offset
;
size_t
dst_offset
;
size_t
size
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueCopyBufferRect_params
{
cl_command_queue
command_queue
;
cl_mem
src_buffer
;
cl_mem
dst_buffer
;
const
size_t
*
src_origin
;
const
size_t
*
dst_origin
;
const
size_t
*
region
;
size_t
src_row_pitch
;
size_t
src_slice_pitch
;
size_t
dst_row_pitch
;
size_t
dst_slice_pitch
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueCopyBufferToImage_params
{
cl_command_queue
command_queue
;
cl_mem
src_buffer
;
cl_mem
dst_image
;
size_t
src_offset
;
const
size_t
*
dst_origin
;
const
size_t
*
region
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueCopyImage_params
{
cl_command_queue
command_queue
;
cl_mem
src_image
;
cl_mem
dst_image
;
const
size_t
*
src_origin
;
const
size_t
*
dst_origin
;
const
size_t
*
region
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueCopyImageToBuffer_params
{
cl_command_queue
command_queue
;
cl_mem
src_image
;
cl_mem
dst_buffer
;
const
size_t
*
src_origin
;
const
size_t
*
region
;
size_t
dst_offset
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueFillBuffer_params
{
cl_command_queue
command_queue
;
cl_mem
buffer
;
const
void
*
pattern
;
size_t
pattern_size
;
size_t
offset
;
size_t
size
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueFillImage_params
{
cl_command_queue
command_queue
;
cl_mem
image
;
const
void
*
fill_color
;
const
size_t
*
origin
;
const
size_t
*
region
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueMapBuffer_params
{
void
**
__retval
;
cl_command_queue
command_queue
;
cl_mem
buffer
;
cl_bool
blocking_map
;
cl_map_flags
map_flags
;
size_t
offset
;
size_t
size
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
cl_int
*
errcode_ret
;
};
struct
clEnqueueMapImage_params
{
void
**
__retval
;
cl_command_queue
command_queue
;
cl_mem
image
;
cl_bool
blocking_map
;
cl_map_flags
map_flags
;
const
size_t
*
origin
;
const
size_t
*
region
;
size_t
*
image_row_pitch
;
size_t
*
image_slice_pitch
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
cl_int
*
errcode_ret
;
};
struct
clEnqueueMarker_params
{
cl_command_queue
command_queue
;
cl_event
*
event
;
};
struct
clEnqueueMarkerWithWaitList_params
{
cl_command_queue
command_queue
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueMigrateMemObjects_params
{
cl_command_queue
command_queue
;
cl_uint
num_mem_objects
;
const
cl_mem
*
mem_objects
;
cl_mem_migration_flags
flags
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueNDRangeKernel_params
{
cl_command_queue
command_queue
;
cl_kernel
kernel
;
cl_uint
work_dim
;
const
size_t
*
global_work_offset
;
const
size_t
*
global_work_size
;
const
size_t
*
local_work_size
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueNativeKernel_params
{
cl_command_queue
command_queue
;
void
(
WINAPI
*
user_func
)(
void
*
);
void
*
args
;
size_t
cb_args
;
cl_uint
num_mem_objects
;
const
cl_mem
*
mem_list
;
const
void
**
args_mem_loc
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueReadBuffer_params
{
cl_command_queue
command_queue
;
cl_mem
buffer
;
cl_bool
blocking_read
;
size_t
offset
;
size_t
size
;
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueReadBufferRect_params
{
cl_command_queue
command_queue
;
cl_mem
buffer
;
cl_bool
blocking_read
;
const
size_t
*
buffer_origin
;
const
size_t
*
host_origin
;
const
size_t
*
region
;
size_t
buffer_row_pitch
;
size_t
buffer_slice_pitch
;
size_t
host_row_pitch
;
size_t
host_slice_pitch
;
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueReadImage_params
{
cl_command_queue
command_queue
;
cl_mem
image
;
cl_bool
blocking_read
;
const
size_t
*
origin
;
const
size_t
*
region
;
size_t
row_pitch
;
size_t
slice_pitch
;
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueTask_params
{
cl_command_queue
command_queue
;
cl_kernel
kernel
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueUnmapMemObject_params
{
cl_command_queue
command_queue
;
cl_mem
memobj
;
void
*
mapped_ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueWaitForEvents_params
{
cl_command_queue
command_queue
;
cl_uint
num_events
;
const
cl_event
*
event_list
;
};
struct
clEnqueueWriteBuffer_params
{
cl_command_queue
command_queue
;
cl_mem
buffer
;
cl_bool
blocking_write
;
size_t
offset
;
size_t
size
;
const
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueWriteBufferRect_params
{
cl_command_queue
command_queue
;
cl_mem
buffer
;
cl_bool
blocking_write
;
const
size_t
*
buffer_origin
;
const
size_t
*
host_origin
;
const
size_t
*
region
;
size_t
buffer_row_pitch
;
size_t
buffer_slice_pitch
;
size_t
host_row_pitch
;
size_t
host_slice_pitch
;
const
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clEnqueueWriteImage_params
{
cl_command_queue
command_queue
;
cl_mem
image
;
cl_bool
blocking_write
;
const
size_t
*
origin
;
const
size_t
*
region
;
size_t
input_row_pitch
;
size_t
input_slice_pitch
;
const
void
*
ptr
;
cl_uint
num_events_in_wait_list
;
const
cl_event
*
event_wait_list
;
cl_event
*
event
;
};
struct
clFinish_params
{
cl_command_queue
command_queue
;
};
struct
clFlush_params
{
cl_command_queue
command_queue
;
};
struct
clGetCommandQueueInfo_params
{
cl_command_queue
command_queue
;
cl_command_queue_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetContextInfo_params
{
cl_context
context
;
cl_context_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetDeviceIDs_params
{
cl_platform_id
platform
;
cl_device_type
device_type
;
cl_uint
num_entries
;
cl_device_id
*
devices
;
cl_uint
*
num_devices
;
};
struct
clGetDeviceInfo_params
{
cl_device_id
device
;
cl_device_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetEventInfo_params
{
cl_event
event
;
cl_event_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetEventProfilingInfo_params
{
cl_event
event
;
cl_profiling_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetImageInfo_params
{
cl_mem
image
;
cl_image_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetKernelArgInfo_params
{
cl_kernel
kernel
;
cl_uint
arg_index
;
cl_kernel_arg_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetKernelInfo_params
{
cl_kernel
kernel
;
cl_kernel_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetKernelWorkGroupInfo_params
{
cl_kernel
kernel
;
cl_device_id
device
;
cl_kernel_work_group_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetMemObjectInfo_params
{
cl_mem
memobj
;
cl_mem_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetPlatformIDs_params
{
cl_uint
num_entries
;
cl_platform_id
*
platforms
;
cl_uint
*
num_platforms
;
};
struct
clGetPlatformInfo_params
{
cl_platform_id
platform
;
cl_platform_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetProgramBuildInfo_params
{
cl_program
program
;
cl_device_id
device
;
cl_program_build_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetProgramInfo_params
{
cl_program
program
;
cl_program_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetSamplerInfo_params
{
cl_sampler
sampler
;
cl_sampler_info
param_name
;
size_t
param_value_size
;
void
*
param_value
;
size_t
*
param_value_size_ret
;
};
struct
clGetSupportedImageFormats_params
{
cl_context
context
;
cl_mem_flags
flags
;
cl_mem_object_type
image_type
;
cl_uint
num_entries
;
cl_image_format
*
image_formats
;
cl_uint
*
num_image_formats
;
};
struct
clLinkProgram_params
{
cl_program
*
__retval
;
cl_context
context
;
cl_uint
num_devices
;
const
cl_device_id
*
device_list
;
const
char
*
options
;
cl_uint
num_input_programs
;
const
cl_program
*
input_programs
;
void
(
WINAPI
*
pfn_notify
)(
cl_program
program
,
void
*
user_data
);
void
*
user_data
;
cl_int
*
errcode_ret
;
};
struct
clReleaseCommandQueue_params
{
cl_command_queue
command_queue
;
};
struct
clReleaseContext_params
{
cl_context
context
;
};
struct
clReleaseDevice_params
{
cl_device_id
device
;
};
struct
clReleaseEvent_params
{
cl_event
event
;
};
struct
clReleaseKernel_params
{
cl_kernel
kernel
;
};
struct
clReleaseMemObject_params
{
cl_mem
memobj
;
};
struct
clReleaseProgram_params
{
cl_program
program
;
};
struct
clReleaseSampler_params
{
cl_sampler
sampler
;
};
struct
clRetainCommandQueue_params
{
cl_command_queue
command_queue
;
};
struct
clRetainContext_params
{
cl_context
context
;
};
struct
clRetainDevice_params
{
cl_device_id
device
;
};
struct
clRetainEvent_params
{
cl_event
event
;
};
struct
clRetainKernel_params
{
cl_kernel
kernel
;
};
struct
clRetainMemObject_params
{
cl_mem
memobj
;
};
struct
clRetainProgram_params
{
cl_program
program
;
};
struct
clRetainSampler_params
{
cl_sampler
sampler
;
};
struct
clSetEventCallback_params
{
cl_event
event
;
cl_int
command_exec_callback_type
;
void
(
WINAPI
*
pfn_notify
)(
cl_event
event
,
cl_int
event_command_status
,
void
*
user_data
);
void
*
user_data
;
};
struct
clSetKernelArg_params
{
cl_kernel
kernel
;
cl_uint
arg_index
;
size_t
arg_size
;
const
void
*
arg_value
;
};
struct
clSetMemObjectDestructorCallback_params
{
cl_mem
memobj
;
void
(
WINAPI
*
pfn_notify
)(
cl_mem
memobj
,
void
*
user_data
);
void
*
user_data
;
};
struct
clSetUserEventStatus_params
{
cl_event
event
;
cl_int
execution_status
;
};
struct
clUnloadCompiler_params
{
};
struct
clUnloadPlatformCompiler_params
{
cl_platform_id
platform
;
};
struct
clWaitForEvents_params
{
cl_uint
num_events
;
const
cl_event
*
event_list
;
};
enum
opencl_funcs
{
unix_clBuildProgram
,
unix_clCompileProgram
,
unix_clCreateBuffer
,
unix_clCreateCommandQueue
,
unix_clCreateContext
,
unix_clCreateContextFromType
,
unix_clCreateImage
,
unix_clCreateImage2D
,
unix_clCreateImage3D
,
unix_clCreateKernel
,
unix_clCreateKernelsInProgram
,
unix_clCreateProgramWithBinary
,
unix_clCreateProgramWithBuiltInKernels
,
unix_clCreateProgramWithSource
,
unix_clCreateSampler
,
unix_clCreateSubBuffer
,
unix_clCreateSubDevices
,
unix_clCreateUserEvent
,
unix_clEnqueueBarrier
,
unix_clEnqueueBarrierWithWaitList
,
unix_clEnqueueCopyBuffer
,
unix_clEnqueueCopyBufferRect
,
unix_clEnqueueCopyBufferToImage
,
unix_clEnqueueCopyImage
,
unix_clEnqueueCopyImageToBuffer
,
unix_clEnqueueFillBuffer
,
unix_clEnqueueFillImage
,
unix_clEnqueueMapBuffer
,
unix_clEnqueueMapImage
,
unix_clEnqueueMarker
,
unix_clEnqueueMarkerWithWaitList
,
unix_clEnqueueMigrateMemObjects
,
unix_clEnqueueNDRangeKernel
,
unix_clEnqueueNativeKernel
,
unix_clEnqueueReadBuffer
,
unix_clEnqueueReadBufferRect
,
unix_clEnqueueReadImage
,
unix_clEnqueueTask
,
unix_clEnqueueUnmapMemObject
,
unix_clEnqueueWaitForEvents
,
unix_clEnqueueWriteBuffer
,
unix_clEnqueueWriteBufferRect
,
unix_clEnqueueWriteImage
,
unix_clFinish
,
unix_clFlush
,
unix_clGetCommandQueueInfo
,
unix_clGetContextInfo
,
unix_clGetDeviceIDs
,
unix_clGetDeviceInfo
,
unix_clGetEventInfo
,
unix_clGetEventProfilingInfo
,
unix_clGetImageInfo
,
unix_clGetKernelArgInfo
,
unix_clGetKernelInfo
,
unix_clGetKernelWorkGroupInfo
,
unix_clGetMemObjectInfo
,
unix_clGetPlatformIDs
,
unix_clGetPlatformInfo
,
unix_clGetProgramBuildInfo
,
unix_clGetProgramInfo
,
unix_clGetSamplerInfo
,
unix_clGetSupportedImageFormats
,
unix_clLinkProgram
,
unix_clReleaseCommandQueue
,
unix_clReleaseContext
,
unix_clReleaseDevice
,
unix_clReleaseEvent
,
unix_clReleaseKernel
,
unix_clReleaseMemObject
,
unix_clReleaseProgram
,
unix_clReleaseSampler
,
unix_clRetainCommandQueue
,
unix_clRetainContext
,
unix_clRetainDevice
,
unix_clRetainEvent
,
unix_clRetainKernel
,
unix_clRetainMemObject
,
unix_clRetainProgram
,
unix_clRetainSampler
,
unix_clSetEventCallback
,
unix_clSetKernelArg
,
unix_clSetMemObjectDestructorCallback
,
unix_clSetUserEventStatus
,
unix_clUnloadCompiler
,
unix_clUnloadPlatformCompiler
,
unix_clWaitForEvents
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment