Migrate CL entry points to libGLESv2

Bug: angleproject:5759
Change-Id: I79644e7bda3ad0a15eb041b2805b8765c0d22029
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2822258
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Commit-Queue: John Plate <jplate@google.com>
This commit is contained in:
John Plate 2021-04-12 19:46:11 +01:00 коммит произвёл Commit Bot
Родитель c8ee13c7b0
Коммит 8994fc7be7
14 изменённых файлов: 682 добавлений и 716 удалений

Просмотреть файл

@ -6,7 +6,7 @@
"scripts/egl_angle_ext.xml":
"5bcc01462b355d933cf3ada15198fb68",
"scripts/generate_loader.py":
"3125733515c3cee68c3ee07c7b688da2",
"e24af68efd9f8149b53225e4b07a20aa",
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml":
@ -20,7 +20,7 @@
"src/libEGL/egl_loader_autogen.h":
"9cbf4d491497058a32642865eb032276",
"src/libOpenCL/cl_loader_autogen.cpp":
"e14107689ee438fb750a89ac6635a39e",
"1251dfd7f095459ff076abb02a5bbf79",
"src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
"ab1ce9e72e1e248b13302349f2228a89",
"src/tests/restricted_traces/trace_egl_loader_autogen.h":

Просмотреть файл

@ -10,7 +10,7 @@
"scripts/entry_point_packed_gl_enums.json":
"4f7b43863a5e61991bba4010db463679",
"scripts/generate_entry_points.py":
"cddb06dad6ee60412d7b7b149966e2fd",
"15459e0793e7bfece50f13991be8d51b",
"scripts/gl.xml":
"2a73a58a7e26d8676a2c0af6d528cae6",
"scripts/gl_angle_ext.xml":
@ -120,13 +120,17 @@
"src/libGL/libGL_autogen.def":
"2789d87b05eea9f53d52e2aff499b785",
"src/libGLESv2/cl_stubs_autogen.h":
"088690549f9eab4aab860d146d4a9c92",
"719dd03921e8cfcd8db6c53c0bddd4ae",
"src/libGLESv2/egl_ext_stubs_autogen.h":
"2ef3b8d087f2a97f7270b96077c93856",
"src/libGLESv2/egl_get_labeled_object_data.json":
"2f4148b2ddf34e62670e32c5e6da4937",
"src/libGLESv2/egl_stubs_autogen.h":
"6439daa350c1663e71dd0af37dcc91df",
"src/libGLESv2/entry_points_cl_autogen.cpp":
"fc02d4dce683eedc19e4e9e321928238",
"src/libGLESv2/entry_points_cl_autogen.h":
"129fa7936c8bc6a20de9269da0c3c7d3",
"src/libGLESv2/entry_points_egl_autogen.cpp":
"e7b708af1c8de435532058eb165d421e",
"src/libGLESv2/entry_points_egl_autogen.h":
@ -167,10 +171,6 @@
"a29336a4763b0ed66b9ddfe4847f68da",
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"301a20588e14724b390409c71d5ccfcd",
"src/libOpenCL/entry_points_cl_autogen.cpp":
"36dc767bd0a475f2ca58549516cf59b1",
"src/libOpenCL/entry_points_cl_autogen.h":
"2e454a6373c1d0964490797898fb630f",
"src/libOpenCL/libOpenCL_autogen.cpp":
"84da77a2f0a740f3a547e24fb1f40208"
"be80b03e4d121921f4a27aba9ad16aa1"
}

Просмотреть файл

@ -252,6 +252,8 @@ void CL_API_CALL CL_{name}({params})
CL_EVENT({name}, "{format_params}"{comma_if_needed}{pass_params});
// TODO: {name}
cl::{name}({internal_params});
}}
"""
@ -262,7 +264,7 @@ TEMPLATE_CL_ENTRY_POINT_WITH_RETURN = """\
// TODO: {name}
return ({return_type})0;
return cl::{name}({internal_params});
}}
"""
@ -283,8 +285,6 @@ TEMPLATE_CL_STUBS_HEADER = """\
namespace cl
{{
class Thread;
{stubs}
}} // namespace cl
#endif // LIBGLESV2_{annotation_upper}_STUBS_AUTOGEN_H_
@ -833,19 +833,18 @@ using namespace egl;
"""
LIBCL_EXPORT_INCLUDES_AND_PREAMBLE = """
//#include "anglebase/no_destructor.h"
//#include "common/system_utils.h"
#include "cl_loader.h"
#include "anglebase/no_destructor.h"
#include "common/system_utils.h"
#include <iostream>
//#include <memory>
#include "cl_loader.h"
#include <memory>
namespace
{
bool gLoaded = false;
/* TODO(jplate): uncomment after entry points moved to GLESV2 lib http://anglebug.com/5759
std::unique_ptr<angle::Library> &EntryPointsLib()
{
static angle::base::NoDestructor<std::unique_ptr<angle::Library>> sEntryPointsLib;
@ -856,7 +855,6 @@ angle::GenericProc CL_API_CALL GlobalLoad(const char *symbol)
{
return reinterpret_cast<angle::GenericProc>(EntryPointsLib()->getSymbol(symbol));
}
*/
void EnsureCLLoaded()
{
@ -865,10 +863,9 @@ void EnsureCLLoaded()
return;
}
// EntryPointsLib().reset(
// angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
// angle::LoadCL(GlobalLoad);
angle::LoadCL(nullptr);
EntryPointsLib().reset(
angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
angle::LoadCL(GlobalLoad);
if (!cl_loader.clGetDeviceIDs)
{
std::cerr << "Error loading CL entry points." << std::endl;
@ -970,6 +967,8 @@ LIBCL_HEADER_INCLUDES = """\
LIBCL_SOURCE_INCLUDES = """\
#include "entry_points_cl_autogen.h"
#include "cl_stubs_autogen.h"
#include "entry_points_cl_utils.h"
"""
@ -2438,11 +2437,12 @@ def write_stubs_header(api, annotation, title, data_source, out_file, all_comman
continue
proto_text = "".join(proto.itertext())
params = ["".join(param.itertext()) for param in command.findall('param')]
params = [] if api == apis.CL else ["Thread *thread"]
params += ["".join(param.itertext()) for param in command.findall('param')]
return_type = proto_text[:-len(cmd_name)].strip()
internal_params = get_internal_params(apis.EGL, cmd_name, ["Thread *thread"] + params,
cmd_packed_egl_enums, packed_param_types)
internal_params = get_internal_params(api, cmd_name, params, cmd_packed_egl_enums,
packed_param_types)
stubs.append("%s %s(%s);" % (return_type, strip_api_prefix(cmd_name), internal_params))
@ -2474,8 +2474,6 @@ def main():
EGL_STUBS_HEADER_PATH,
EGL_EXT_STUBS_HEADER_PATH,
'../src/libOpenCL/libOpenCL_autogen.cpp',
'../src/libOpenCL/entry_points_cl_autogen.cpp',
'../src/libOpenCL/entry_points_cl_autogen.h',
'../src/common/entry_points_enum_autogen.cpp',
'../src/common/entry_points_enum_autogen.h',
'../src/libANGLE/Context_gl_1_autogen.h',
@ -2516,6 +2514,8 @@ def main():
'../src/libANGLE/validationGL4_autogen.h',
'../src/libEGL/libEGL_autogen.cpp',
'../src/libEGL/libEGL_autogen.def',
'../src/libGLESv2/entry_points_cl_autogen.cpp',
'../src/libGLESv2/entry_points_cl_autogen.h',
'../src/libGLESv2/entry_points_egl_autogen.cpp',
'../src/libGLESv2/entry_points_egl_autogen.h',
'../src/libGLESv2/entry_points_egl_ext_autogen.cpp',
@ -2857,9 +2857,9 @@ def main():
libcl_windows_def_exports += [win_def_comment] + get_exports(clxml.commands[version])
write_file("cl", "CL", TEMPLATE_ENTRY_POINT_HEADER, "\n".join(cl_decls), "h",
LIBCL_HEADER_INCLUDES, "libOpenCL", "cl.xml")
LIBCL_HEADER_INCLUDES, "libGLESv2", "cl.xml")
write_file("cl", "CL", TEMPLATE_ENTRY_POINT_SOURCE, "\n".join(cl_defs), "cpp",
LIBCL_SOURCE_INCLUDES, "libOpenCL", "cl.xml")
LIBCL_SOURCE_INCLUDES, "libGLESv2", "cl.xml")
write_stubs_header("CL", "cl", "CL", "cl.xml", CL_STUBS_HEADER_PATH, clxml.all_commands,
cl_commands, CLEntryPoints.get_packed_enums(), CL_PACKED_TYPES)

Просмотреть файл

@ -116,11 +116,8 @@ def gen_libcl_loader():
source_path = registry_xml.path_to(path, "cl_loader_autogen.cpp")
with open(source_path, "w") as out:
# TODO(jplate): use first setters after migration in http://anglebug.com/5759
# setter = " cl_loader.%s = reinterpret_cast<cl_api_%s>(loadProc(\"CL_%s\"));"
# setters = [setter % (cmd, cmd, cmd[2:]) for cmd in all_cmds]
setter = " cl_loader.%s = CL_%s;"
setters = [setter % (cmd, cmd[2:]) for cmd in all_cmds]
setter = " cl_loader.%s = reinterpret_cast<cl_api_%s>(loadProc(\"CL_%s\"));"
setters = [setter % (cmd, cmd, cmd[2:]) for cmd in all_cmds]
loader_source = template_cl_loader_cpp.format(
script_name=os.path.basename(sys.argv[0]),
@ -433,9 +430,6 @@ template_cl_loader_cpp = """// GENERATED FILE - DO NOT EDIT.
#include "cl_loader.h"
// TODO(jplate): remove include after entry points moved to GLESV2 lib http://anglebug.com/5759
#include "entry_points_cl_autogen.h"
cl_icd_dispatch cl_loader;
namespace angle

Просмотреть файл

@ -517,6 +517,9 @@ libglesv2_sources = [
"src/libGLESv2/egl_ext_stubs_autogen.h",
"src/libGLESv2/egl_stubs.cpp",
"src/libGLESv2/egl_stubs_autogen.h",
"src/libGLESv2/entry_points_cl_autogen.cpp",
"src/libGLESv2/entry_points_cl_autogen.h",
"src/libGLESv2/entry_points_cl_utils.h",
"src/libGLESv2/entry_points_egl_autogen.cpp",
"src/libGLESv2/entry_points_egl_autogen.h",
"src/libGLESv2/entry_points_egl_ext_autogen.cpp",

Просмотреть файл

@ -10,16 +10,12 @@
namespace cl
{
cl_int GetPlatformIDs(Thread *thread,
cl_uint num_entries,
cl_platform_id *platforms,
cl_uint *num_platforms)
cl_int GetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms)
{
return 0;
}
cl_int GetPlatformInfo(Thread *thread,
cl_platform_id platform,
cl_int GetPlatformInfo(cl_platform_id platform,
cl_platform_info param_name,
size_t param_value_size,
void *param_value,
@ -28,8 +24,7 @@ cl_int GetPlatformInfo(Thread *thread,
return 0;
}
cl_int GetDeviceIDs(Thread *thread,
cl_platform_id platform,
cl_int GetDeviceIDs(cl_platform_id platform,
cl_device_type device_type,
cl_uint num_entries,
cl_device_id *devices,
@ -38,8 +33,7 @@ cl_int GetDeviceIDs(Thread *thread,
return 0;
}
cl_int GetDeviceInfo(Thread *thread,
cl_device_id device,
cl_int GetDeviceInfo(cl_device_id device,
cl_device_info param_name,
size_t param_value_size,
void *param_value,
@ -48,8 +42,7 @@ cl_int GetDeviceInfo(Thread *thread,
return 0;
}
cl_int CreateSubDevices(Thread *thread,
cl_device_id in_device,
cl_int CreateSubDevices(cl_device_id in_device,
const cl_device_partition_property *properties,
cl_uint num_devices,
cl_device_id *out_devices,
@ -58,39 +51,36 @@ cl_int CreateSubDevices(Thread *thread,
return 0;
}
cl_int RetainDevice(Thread *thread, cl_device_id device)
cl_int RetainDevice(cl_device_id device)
{
return 0;
}
cl_int ReleaseDevice(Thread *thread, cl_device_id device)
cl_int ReleaseDevice(cl_device_id device)
{
return 0;
}
cl_int SetDefaultDeviceCommandQueue(Thread *thread,
cl_context context,
cl_int SetDefaultDeviceCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue command_queue)
{
return 0;
}
cl_int GetDeviceAndHostTimer(Thread *thread,
cl_device_id device,
cl_int GetDeviceAndHostTimer(cl_device_id device,
cl_ulong *device_timestamp,
cl_ulong *host_timestamp)
{
return 0;
}
cl_int GetHostTimer(Thread *thread, cl_device_id device, cl_ulong *host_timestamp)
cl_int GetHostTimer(cl_device_id device, cl_ulong *host_timestamp)
{
return 0;
}
cl_context CreateContext(Thread *thread,
const cl_context_properties *properties,
cl_context CreateContext(const cl_context_properties *properties,
cl_uint num_devices,
const cl_device_id *devices,
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
@ -103,8 +93,7 @@ cl_context CreateContext(Thread *thread,
return 0;
}
cl_context CreateContextFromType(Thread *thread,
const cl_context_properties *properties,
cl_context CreateContextFromType(const cl_context_properties *properties,
cl_device_type device_type,
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
const void *private_info,
@ -116,18 +105,17 @@ cl_context CreateContextFromType(Thread *thread,
return 0;
}
cl_int RetainContext(Thread *thread, cl_context context)
cl_int RetainContext(cl_context context)
{
return 0;
}
cl_int ReleaseContext(Thread *thread, cl_context context)
cl_int ReleaseContext(cl_context context)
{
return 0;
}
cl_int GetContextInfo(Thread *thread,
cl_context context,
cl_int GetContextInfo(cl_context context,
cl_context_info param_name,
size_t param_value_size,
void *param_value,
@ -136,8 +124,7 @@ cl_int GetContextInfo(Thread *thread,
return 0;
}
cl_int SetContextDestructorCallback(Thread *thread,
cl_context context,
cl_int SetContextDestructorCallback(cl_context context,
void(CL_CALLBACK *pfn_notify)(cl_context context,
void *user_data),
void *user_data)
@ -145,8 +132,7 @@ cl_int SetContextDestructorCallback(Thread *thread,
return 0;
}
cl_command_queue CreateCommandQueueWithProperties(Thread *thread,
cl_context context,
cl_command_queue CreateCommandQueueWithProperties(cl_context context,
cl_device_id device,
const cl_queue_properties *properties,
cl_int *errcode_ret)
@ -154,18 +140,17 @@ cl_command_queue CreateCommandQueueWithProperties(Thread *thread,
return 0;
}
cl_int RetainCommandQueue(Thread *thread, cl_command_queue command_queue)
cl_int RetainCommandQueue(cl_command_queue command_queue)
{
return 0;
}
cl_int ReleaseCommandQueue(Thread *thread, cl_command_queue command_queue)
cl_int ReleaseCommandQueue(cl_command_queue command_queue)
{
return 0;
}
cl_int GetCommandQueueInfo(Thread *thread,
cl_command_queue command_queue,
cl_int GetCommandQueueInfo(cl_command_queue command_queue,
cl_command_queue_info param_name,
size_t param_value_size,
void *param_value,
@ -174,8 +159,7 @@ cl_int GetCommandQueueInfo(Thread *thread,
return 0;
}
cl_mem CreateBuffer(Thread *thread,
cl_context context,
cl_mem CreateBuffer(cl_context context,
cl_mem_flags flags,
size_t size,
void *host_ptr,
@ -184,8 +168,7 @@ cl_mem CreateBuffer(Thread *thread,
return 0;
}
cl_mem CreateBufferWithProperties(Thread *thread,
cl_context context,
cl_mem CreateBufferWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
size_t size,
@ -195,8 +178,7 @@ cl_mem CreateBufferWithProperties(Thread *thread,
return 0;
}
cl_mem CreateSubBuffer(Thread *thread,
cl_mem buffer,
cl_mem CreateSubBuffer(cl_mem buffer,
cl_mem_flags flags,
cl_buffer_create_type buffer_create_type,
const void *buffer_create_info,
@ -205,8 +187,7 @@ cl_mem CreateSubBuffer(Thread *thread,
return 0;
}
cl_mem CreateImage(Thread *thread,
cl_context context,
cl_mem CreateImage(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
const cl_image_desc *image_desc,
@ -216,8 +197,7 @@ cl_mem CreateImage(Thread *thread,
return 0;
}
cl_mem CreateImageWithProperties(Thread *thread,
cl_context context,
cl_mem CreateImageWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
const cl_image_format *image_format,
@ -228,8 +208,7 @@ cl_mem CreateImageWithProperties(Thread *thread,
return 0;
}
cl_mem CreatePipe(Thread *thread,
cl_context context,
cl_mem CreatePipe(cl_context context,
cl_mem_flags flags,
cl_uint pipe_packet_size,
cl_uint pipe_max_packets,
@ -239,18 +218,17 @@ cl_mem CreatePipe(Thread *thread,
return 0;
}
cl_int RetainMemObject(Thread *thread, cl_mem memobj)
cl_int RetainMemObject(cl_mem memobj)
{
return 0;
}
cl_int ReleaseMemObject(Thread *thread, cl_mem memobj)
cl_int ReleaseMemObject(cl_mem memobj)
{
return 0;
}
cl_int GetSupportedImageFormats(Thread *thread,
cl_context context,
cl_int GetSupportedImageFormats(cl_context context,
cl_mem_flags flags,
cl_mem_object_type image_type,
cl_uint num_entries,
@ -260,8 +238,7 @@ cl_int GetSupportedImageFormats(Thread *thread,
return 0;
}
cl_int GetMemObjectInfo(Thread *thread,
cl_mem memobj,
cl_int GetMemObjectInfo(cl_mem memobj,
cl_mem_info param_name,
size_t param_value_size,
void *param_value,
@ -270,8 +247,7 @@ cl_int GetMemObjectInfo(Thread *thread,
return 0;
}
cl_int GetImageInfo(Thread *thread,
cl_mem image,
cl_int GetImageInfo(cl_mem image,
cl_image_info param_name,
size_t param_value_size,
void *param_value,
@ -280,8 +256,7 @@ cl_int GetImageInfo(Thread *thread,
return 0;
}
cl_int GetPipeInfo(Thread *thread,
cl_mem pipe,
cl_int GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
size_t param_value_size,
void *param_value,
@ -290,45 +265,38 @@ cl_int GetPipeInfo(Thread *thread,
return 0;
}
cl_int SetMemObjectDestructorCallback(Thread *thread,
cl_mem memobj,
cl_int SetMemObjectDestructorCallback(cl_mem memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj, void *user_data),
void *user_data)
{
return 0;
}
void *SVMAlloc(Thread *thread,
cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment)
void *SVMAlloc(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment)
{
return 0;
}
void SVMFree(Thread *thread, cl_context context, void *svm_pointer) {}
void SVMFree(cl_context context, void *svm_pointer) {}
cl_sampler CreateSamplerWithProperties(Thread *thread,
cl_context context,
cl_sampler CreateSamplerWithProperties(cl_context context,
const cl_sampler_properties *sampler_properties,
cl_int *errcode_ret)
{
return 0;
}
cl_int RetainSampler(Thread *thread, cl_sampler sampler)
cl_int RetainSampler(cl_sampler sampler)
{
return 0;
}
cl_int ReleaseSampler(Thread *thread, cl_sampler sampler)
cl_int ReleaseSampler(cl_sampler sampler)
{
return 0;
}
cl_int GetSamplerInfo(Thread *thread,
cl_sampler sampler,
cl_int GetSamplerInfo(cl_sampler sampler,
cl_sampler_info param_name,
size_t param_value_size,
void *param_value,
@ -337,8 +305,7 @@ cl_int GetSamplerInfo(Thread *thread,
return 0;
}
cl_program CreateProgramWithSource(Thread *thread,
cl_context context,
cl_program CreateProgramWithSource(cl_context context,
cl_uint count,
const char **strings,
const size_t *lengths,
@ -347,8 +314,7 @@ cl_program CreateProgramWithSource(Thread *thread,
return 0;
}
cl_program CreateProgramWithBinary(Thread *thread,
cl_context context,
cl_program CreateProgramWithBinary(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const size_t *lengths,
@ -359,8 +325,7 @@ cl_program CreateProgramWithBinary(Thread *thread,
return 0;
}
cl_program CreateProgramWithBuiltInKernels(Thread *thread,
cl_context context,
cl_program CreateProgramWithBuiltInKernels(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *kernel_names,
@ -369,8 +334,7 @@ cl_program CreateProgramWithBuiltInKernels(Thread *thread,
return 0;
}
cl_program CreateProgramWithIL(Thread *thread,
cl_context context,
cl_program CreateProgramWithIL(cl_context context,
const void *il,
size_t length,
cl_int *errcode_ret)
@ -378,18 +342,17 @@ cl_program CreateProgramWithIL(Thread *thread,
return 0;
}
cl_int RetainProgram(Thread *thread, cl_program program)
cl_int RetainProgram(cl_program program)
{
return 0;
}
cl_int ReleaseProgram(Thread *thread, cl_program program)
cl_int ReleaseProgram(cl_program program)
{
return 0;
}
cl_int BuildProgram(Thread *thread,
cl_program program,
cl_int BuildProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
@ -399,8 +362,7 @@ cl_int BuildProgram(Thread *thread,
return 0;
}
cl_int CompileProgram(Thread *thread,
cl_program program,
cl_int CompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
@ -413,8 +375,7 @@ cl_int CompileProgram(Thread *thread,
return 0;
}
cl_program LinkProgram(Thread *thread,
cl_context context,
cl_program LinkProgram(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
@ -427,16 +388,14 @@ cl_program LinkProgram(Thread *thread,
return 0;
}
cl_int SetProgramReleaseCallback(Thread *thread,
cl_program program,
cl_int SetProgramReleaseCallback(cl_program program,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data)
{
return 0;
}
cl_int SetProgramSpecializationConstant(Thread *thread,
cl_program program,
cl_int SetProgramSpecializationConstant(cl_program program,
cl_uint spec_id,
size_t spec_size,
const void *spec_value)
@ -444,13 +403,12 @@ cl_int SetProgramSpecializationConstant(Thread *thread,
return 0;
}
cl_int UnloadPlatformCompiler(Thread *thread, cl_platform_id platform)
cl_int UnloadPlatformCompiler(cl_platform_id platform)
{
return 0;
}
cl_int GetProgramInfo(Thread *thread,
cl_program program,
cl_int GetProgramInfo(cl_program program,
cl_program_info param_name,
size_t param_value_size,
void *param_value,
@ -459,8 +417,7 @@ cl_int GetProgramInfo(Thread *thread,
return 0;
}
cl_int GetProgramBuildInfo(Thread *thread,
cl_program program,
cl_int GetProgramBuildInfo(cl_program program,
cl_device_id device,
cl_program_build_info param_name,
size_t param_value_size,
@ -470,16 +427,12 @@ cl_int GetProgramBuildInfo(Thread *thread,
return 0;
}
cl_kernel CreateKernel(Thread *thread,
cl_program program,
const char *kernel_name,
cl_int *errcode_ret)
cl_kernel CreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret)
{
return 0;
}
cl_int CreateKernelsInProgram(Thread *thread,
cl_program program,
cl_int CreateKernelsInProgram(cl_program program,
cl_uint num_kernels,
cl_kernel *kernels,
cl_uint *num_kernels_ret)
@ -487,40 +440,32 @@ cl_int CreateKernelsInProgram(Thread *thread,
return 0;
}
cl_kernel CloneKernel(Thread *thread, cl_kernel source_kernel, cl_int *errcode_ret)
cl_kernel CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret)
{
return 0;
}
cl_int RetainKernel(Thread *thread, cl_kernel kernel)
cl_int RetainKernel(cl_kernel kernel)
{
return 0;
}
cl_int ReleaseKernel(Thread *thread, cl_kernel kernel)
cl_int ReleaseKernel(cl_kernel kernel)
{
return 0;
}
cl_int SetKernelArg(Thread *thread,
cl_kernel kernel,
cl_uint arg_index,
size_t arg_size,
const void *arg_value)
cl_int SetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value)
{
return 0;
}
cl_int SetKernelArgSVMPointer(Thread *thread,
cl_kernel kernel,
cl_uint arg_index,
const void *arg_value)
cl_int SetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value)
{
return 0;
}
cl_int SetKernelExecInfo(Thread *thread,
cl_kernel kernel,
cl_int SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
size_t param_value_size,
const void *param_value)
@ -528,8 +473,7 @@ cl_int SetKernelExecInfo(Thread *thread,
return 0;
}
cl_int GetKernelInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelInfo(cl_kernel kernel,
cl_kernel_info param_name,
size_t param_value_size,
void *param_value,
@ -538,8 +482,7 @@ cl_int GetKernelInfo(Thread *thread,
return 0;
}
cl_int GetKernelArgInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelArgInfo(cl_kernel kernel,
cl_uint arg_index,
cl_kernel_arg_info param_name,
size_t param_value_size,
@ -549,8 +492,7 @@ cl_int GetKernelArgInfo(Thread *thread,
return 0;
}
cl_int GetKernelWorkGroupInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelWorkGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_work_group_info param_name,
size_t param_value_size,
@ -560,8 +502,7 @@ cl_int GetKernelWorkGroupInfo(Thread *thread,
return 0;
}
cl_int GetKernelSubGroupInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
size_t input_value_size,
@ -573,13 +514,12 @@ cl_int GetKernelSubGroupInfo(Thread *thread,
return 0;
}
cl_int WaitForEvents(Thread *thread, cl_uint num_events, const cl_event *event_list)
cl_int WaitForEvents(cl_uint num_events, const cl_event *event_list)
{
return 0;
}
cl_int GetEventInfo(Thread *thread,
cl_event event,
cl_int GetEventInfo(cl_event event,
cl_event_info param_name,
size_t param_value_size,
void *param_value,
@ -588,28 +528,27 @@ cl_int GetEventInfo(Thread *thread,
return 0;
}
cl_event CreateUserEvent(Thread *thread, cl_context context, cl_int *errcode_ret)
cl_event CreateUserEvent(cl_context context, cl_int *errcode_ret)
{
return 0;
}
cl_int RetainEvent(Thread *thread, cl_event event)
cl_int RetainEvent(cl_event event)
{
return 0;
}
cl_int ReleaseEvent(Thread *thread, cl_event event)
cl_int ReleaseEvent(cl_event event)
{
return 0;
}
cl_int SetUserEventStatus(Thread *thread, cl_event event, cl_int execution_status)
cl_int SetUserEventStatus(cl_event event, cl_int execution_status)
{
return 0;
}
cl_int SetEventCallback(Thread *thread,
cl_event event,
cl_int SetEventCallback(cl_event event,
cl_int command_exec_callback_type,
void(CL_CALLBACK *pfn_notify)(cl_event event,
cl_int event_command_status,
@ -619,8 +558,7 @@ cl_int SetEventCallback(Thread *thread,
return 0;
}
cl_int GetEventProfilingInfo(Thread *thread,
cl_event event,
cl_int GetEventProfilingInfo(cl_event event,
cl_profiling_info param_name,
size_t param_value_size,
void *param_value,
@ -629,18 +567,17 @@ cl_int GetEventProfilingInfo(Thread *thread,
return 0;
}
cl_int Flush(Thread *thread, cl_command_queue command_queue)
cl_int Flush(cl_command_queue command_queue)
{
return 0;
}
cl_int Finish(Thread *thread, cl_command_queue command_queue)
cl_int Finish(cl_command_queue command_queue)
{
return 0;
}
cl_int EnqueueReadBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueReadBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
size_t offset,
@ -653,8 +590,7 @@ cl_int EnqueueReadBuffer(Thread *thread,
return 0;
}
cl_int EnqueueReadBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueReadBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t *buffer_origin,
@ -672,8 +608,7 @@ cl_int EnqueueReadBufferRect(Thread *thread,
return 0;
}
cl_int EnqueueWriteBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
size_t offset,
@ -686,8 +621,7 @@ cl_int EnqueueWriteBuffer(Thread *thread,
return 0;
}
cl_int EnqueueWriteBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
const size_t *buffer_origin,
@ -705,8 +639,7 @@ cl_int EnqueueWriteBufferRect(Thread *thread,
return 0;
}
cl_int EnqueueFillBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void *pattern,
size_t pattern_size,
@ -719,8 +652,7 @@ cl_int EnqueueFillBuffer(Thread *thread,
return 0;
}
cl_int EnqueueCopyBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBuffer(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
size_t src_offset,
@ -733,8 +665,7 @@ cl_int EnqueueCopyBuffer(Thread *thread,
return 0;
}
cl_int EnqueueCopyBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBufferRect(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t *src_origin,
@ -751,8 +682,7 @@ cl_int EnqueueCopyBufferRect(Thread *thread,
return 0;
}
cl_int EnqueueReadImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueReadImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_read,
const size_t *origin,
@ -767,8 +697,7 @@ cl_int EnqueueReadImage(Thread *thread,
return 0;
}
cl_int EnqueueWriteImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_write,
const size_t *origin,
@ -783,8 +712,7 @@ cl_int EnqueueWriteImage(Thread *thread,
return 0;
}
cl_int EnqueueFillImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void *fill_color,
const size_t *origin,
@ -796,8 +724,7 @@ cl_int EnqueueFillImage(Thread *thread,
return 0;
}
cl_int EnqueueCopyImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyImage(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_image,
const size_t *src_origin,
@ -810,8 +737,7 @@ cl_int EnqueueCopyImage(Thread *thread,
return 0;
}
cl_int EnqueueCopyImageToBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyImageToBuffer(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_buffer,
const size_t *src_origin,
@ -824,8 +750,7 @@ cl_int EnqueueCopyImageToBuffer(Thread *thread,
return 0;
}
cl_int EnqueueCopyBufferToImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBufferToImage(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_image,
size_t src_offset,
@ -838,8 +763,7 @@ cl_int EnqueueCopyBufferToImage(Thread *thread,
return 0;
}
void *EnqueueMapBuffer(Thread *thread,
cl_command_queue command_queue,
void *EnqueueMapBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_map,
cl_map_flags map_flags,
@ -853,8 +777,7 @@ void *EnqueueMapBuffer(Thread *thread,
return 0;
}
void *EnqueueMapImage(Thread *thread,
cl_command_queue command_queue,
void *EnqueueMapImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_map,
cl_map_flags map_flags,
@ -870,8 +793,7 @@ void *EnqueueMapImage(Thread *thread,
return 0;
}
cl_int EnqueueUnmapMemObject(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueUnmapMemObject(cl_command_queue command_queue,
cl_mem memobj,
void *mapped_ptr,
cl_uint num_events_in_wait_list,
@ -881,8 +803,7 @@ cl_int EnqueueUnmapMemObject(Thread *thread,
return 0;
}
cl_int EnqueueMigrateMemObjects(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueMigrateMemObjects(cl_command_queue command_queue,
cl_uint num_mem_objects,
const cl_mem *mem_objects,
cl_mem_migration_flags flags,
@ -893,8 +814,7 @@ cl_int EnqueueMigrateMemObjects(Thread *thread,
return 0;
}
cl_int EnqueueNDRangeKernel(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueNDRangeKernel(cl_command_queue command_queue,
cl_kernel kernel,
cl_uint work_dim,
const size_t *global_work_offset,
@ -907,8 +827,7 @@ cl_int EnqueueNDRangeKernel(Thread *thread,
return 0;
}
cl_int EnqueueNativeKernel(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueNativeKernel(cl_command_queue command_queue,
void(CL_CALLBACK *user_func)(void *),
void *args,
size_t cb_args,
@ -922,8 +841,7 @@ cl_int EnqueueNativeKernel(Thread *thread,
return 0;
}
cl_int EnqueueMarkerWithWaitList(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueMarkerWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
@ -931,8 +849,7 @@ cl_int EnqueueMarkerWithWaitList(Thread *thread,
return 0;
}
cl_int EnqueueBarrierWithWaitList(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueBarrierWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event)
@ -940,8 +857,7 @@ cl_int EnqueueBarrierWithWaitList(Thread *thread,
return 0;
}
cl_int EnqueueSVMFree(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
@ -956,8 +872,7 @@ cl_int EnqueueSVMFree(Thread *thread,
return 0;
}
cl_int EnqueueSVMMemcpy(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
const void *src_ptr,
@ -969,8 +884,7 @@ cl_int EnqueueSVMMemcpy(Thread *thread,
return 0;
}
cl_int EnqueueSVMMemFill(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
size_t pattern_size,
@ -982,8 +896,7 @@ cl_int EnqueueSVMMemFill(Thread *thread,
return 0;
}
cl_int EnqueueSVMMap(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void *svm_ptr,
@ -995,8 +908,7 @@ cl_int EnqueueSVMMap(Thread *thread,
return 0;
}
cl_int EnqueueSVMUnmap(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
@ -1005,8 +917,7 @@ cl_int EnqueueSVMUnmap(Thread *thread,
return 0;
}
cl_int EnqueueSVMMigrateMem(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMigrateMem(cl_command_queue command_queue,
cl_uint num_svm_pointers,
const void **svm_pointers,
const size_t *sizes,
@ -1018,15 +929,12 @@ cl_int EnqueueSVMMigrateMem(Thread *thread,
return 0;
}
void *GetExtensionFunctionAddressForPlatform(Thread *thread,
cl_platform_id platform,
const char *func_name)
void *GetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *func_name)
{
return 0;
}
cl_int SetCommandQueueProperty(Thread *thread,
cl_command_queue command_queue,
cl_int SetCommandQueueProperty(cl_command_queue command_queue,
cl_command_queue_properties properties,
cl_bool enable,
cl_command_queue_properties *old_properties)
@ -1034,8 +942,7 @@ cl_int SetCommandQueueProperty(Thread *thread,
return 0;
}
cl_mem CreateImage2D(Thread *thread,
cl_context context,
cl_mem CreateImage2D(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
size_t image_width,
@ -1047,8 +954,7 @@ cl_mem CreateImage2D(Thread *thread,
return 0;
}
cl_mem CreateImage3D(Thread *thread,
cl_context context,
cl_mem CreateImage3D(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
size_t image_width,
@ -1062,36 +968,34 @@ cl_mem CreateImage3D(Thread *thread,
return 0;
}
cl_int EnqueueMarker(Thread *thread, cl_command_queue command_queue, cl_event *event)
cl_int EnqueueMarker(cl_command_queue command_queue, cl_event *event)
{
return 0;
}
cl_int EnqueueWaitForEvents(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWaitForEvents(cl_command_queue command_queue,
cl_uint num_events,
const cl_event *event_list)
{
return 0;
}
cl_int EnqueueBarrier(Thread *thread, cl_command_queue command_queue)
cl_int EnqueueBarrier(cl_command_queue command_queue)
{
return 0;
}
cl_int UnloadCompiler(Thread *thread)
cl_int UnloadCompiler()
{
return 0;
}
void *GetExtensionFunctionAddress(Thread *thread, const char *func_name)
void *GetExtensionFunctionAddress(const char *func_name)
{
return 0;
}
cl_command_queue CreateCommandQueue(Thread *thread,
cl_context context,
cl_command_queue CreateCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue_properties properties,
cl_int *errcode_ret)
@ -1099,8 +1003,7 @@ cl_command_queue CreateCommandQueue(Thread *thread,
return 0;
}
cl_sampler CreateSampler(Thread *thread,
cl_context context,
cl_sampler CreateSampler(cl_context context,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode,
@ -1109,8 +1012,7 @@ cl_sampler CreateSampler(Thread *thread,
return 0;
}
cl_int EnqueueTask(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueTask(cl_command_queue command_queue,
cl_kernel kernel,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,

Просмотреть файл

@ -14,49 +14,37 @@
namespace cl
{
class Thread;
cl_int GetPlatformIDs(Thread *thread,
cl_uint num_entries,
cl_platform_id *platforms,
cl_uint *num_platforms);
cl_int GetPlatformInfo(Thread *thread,
cl_platform_id platform,
cl_int GetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms);
cl_int GetPlatformInfo(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 GetDeviceIDs(Thread *thread,
cl_platform_id platform,
cl_int GetDeviceIDs(cl_platform_id platform,
cl_device_type device_type,
cl_uint num_entries,
cl_device_id *devices,
cl_uint *num_devices);
cl_int GetDeviceInfo(Thread *thread,
cl_device_id device,
cl_int GetDeviceInfo(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 CreateSubDevices(Thread *thread,
cl_device_id in_device,
cl_int CreateSubDevices(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_int RetainDevice(Thread *thread, cl_device_id device);
cl_int ReleaseDevice(Thread *thread, cl_device_id device);
cl_int SetDefaultDeviceCommandQueue(Thread *thread,
cl_context context,
cl_int RetainDevice(cl_device_id device);
cl_int ReleaseDevice(cl_device_id device);
cl_int SetDefaultDeviceCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue command_queue);
cl_int GetDeviceAndHostTimer(Thread *thread,
cl_device_id device,
cl_int GetDeviceAndHostTimer(cl_device_id device,
cl_ulong *device_timestamp,
cl_ulong *host_timestamp);
cl_int GetHostTimer(Thread *thread, cl_device_id device, cl_ulong *host_timestamp);
cl_context CreateContext(Thread *thread,
const cl_context_properties *properties,
cl_int GetHostTimer(cl_device_id device, cl_ulong *host_timestamp);
cl_context CreateContext(const cl_context_properties *properties,
cl_uint num_devices,
const cl_device_id *devices,
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
@ -65,8 +53,7 @@ cl_context CreateContext(Thread *thread,
void *user_data),
void *user_data,
cl_int *errcode_ret);
cl_context CreateContextFromType(Thread *thread,
const cl_context_properties *properties,
cl_context CreateContextFromType(const cl_context_properties *properties,
cl_device_type device_type,
void(CL_CALLBACK *pfn_notify)(const char *errinfo,
const void *private_info,
@ -74,158 +61,131 @@ cl_context CreateContextFromType(Thread *thread,
void *user_data),
void *user_data,
cl_int *errcode_ret);
cl_int RetainContext(Thread *thread, cl_context context);
cl_int ReleaseContext(Thread *thread, cl_context context);
cl_int GetContextInfo(Thread *thread,
cl_context context,
cl_int RetainContext(cl_context context);
cl_int ReleaseContext(cl_context context);
cl_int GetContextInfo(cl_context context,
cl_context_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int SetContextDestructorCallback(Thread *thread,
cl_context context,
cl_int SetContextDestructorCallback(cl_context context,
void(CL_CALLBACK *pfn_notify)(cl_context context,
void *user_data),
void *user_data);
cl_command_queue CreateCommandQueueWithProperties(Thread *thread,
cl_context context,
cl_command_queue CreateCommandQueueWithProperties(cl_context context,
cl_device_id device,
const cl_queue_properties *properties,
cl_int *errcode_ret);
cl_int RetainCommandQueue(Thread *thread, cl_command_queue command_queue);
cl_int ReleaseCommandQueue(Thread *thread, cl_command_queue command_queue);
cl_int GetCommandQueueInfo(Thread *thread,
cl_command_queue command_queue,
cl_int RetainCommandQueue(cl_command_queue command_queue);
cl_int ReleaseCommandQueue(cl_command_queue command_queue);
cl_int GetCommandQueueInfo(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_mem CreateBuffer(Thread *thread,
cl_context context,
cl_mem CreateBuffer(cl_context context,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret);
cl_mem CreateBufferWithProperties(Thread *thread,
cl_context context,
cl_mem CreateBufferWithProperties(cl_context context,
const cl_mem_properties *properties,
cl_mem_flags flags,
size_t size,
void *host_ptr,
cl_int *errcode_ret);
cl_mem CreateSubBuffer(Thread *thread,
cl_mem buffer,
cl_mem CreateSubBuffer(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 CreateImage(Thread *thread,
cl_context context,
cl_mem CreateImage(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 CreateImageWithProperties(Thread *thread,
cl_context context,
cl_mem CreateImageWithProperties(cl_context context,
const cl_mem_properties *properties,
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 CreatePipe(Thread *thread,
cl_context context,
cl_mem CreatePipe(cl_context context,
cl_mem_flags flags,
cl_uint pipe_packet_size,
cl_uint pipe_max_packets,
const cl_pipe_properties *properties,
cl_int *errcode_ret);
cl_int RetainMemObject(Thread *thread, cl_mem memobj);
cl_int ReleaseMemObject(Thread *thread, cl_mem memobj);
cl_int GetSupportedImageFormats(Thread *thread,
cl_context context,
cl_int RetainMemObject(cl_mem memobj);
cl_int ReleaseMemObject(cl_mem memobj);
cl_int GetSupportedImageFormats(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_int GetMemObjectInfo(Thread *thread,
cl_mem memobj,
cl_int GetMemObjectInfo(cl_mem memobj,
cl_mem_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetImageInfo(Thread *thread,
cl_mem image,
cl_int GetImageInfo(cl_mem image,
cl_image_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetPipeInfo(Thread *thread,
cl_mem pipe,
cl_int GetPipeInfo(cl_mem pipe,
cl_pipe_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int SetMemObjectDestructorCallback(Thread *thread,
cl_mem memobj,
cl_int SetMemObjectDestructorCallback(cl_mem memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj, void *user_data),
void *user_data);
void *SVMAlloc(Thread *thread,
cl_context context,
cl_svm_mem_flags flags,
size_t size,
cl_uint alignment);
void SVMFree(Thread *thread, cl_context context, void *svm_pointer);
cl_sampler CreateSamplerWithProperties(Thread *thread,
cl_context context,
void *SVMAlloc(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment);
void SVMFree(cl_context context, void *svm_pointer);
cl_sampler CreateSamplerWithProperties(cl_context context,
const cl_sampler_properties *sampler_properties,
cl_int *errcode_ret);
cl_int RetainSampler(Thread *thread, cl_sampler sampler);
cl_int ReleaseSampler(Thread *thread, cl_sampler sampler);
cl_int GetSamplerInfo(Thread *thread,
cl_sampler sampler,
cl_int RetainSampler(cl_sampler sampler);
cl_int ReleaseSampler(cl_sampler sampler);
cl_int GetSamplerInfo(cl_sampler sampler,
cl_sampler_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_program CreateProgramWithSource(Thread *thread,
cl_context context,
cl_program CreateProgramWithSource(cl_context context,
cl_uint count,
const char **strings,
const size_t *lengths,
cl_int *errcode_ret);
cl_program CreateProgramWithBinary(Thread *thread,
cl_context context,
cl_program CreateProgramWithBinary(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 CreateProgramWithBuiltInKernels(Thread *thread,
cl_context context,
cl_program CreateProgramWithBuiltInKernels(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *kernel_names,
cl_int *errcode_ret);
cl_program CreateProgramWithIL(Thread *thread,
cl_context context,
cl_program CreateProgramWithIL(cl_context context,
const void *il,
size_t length,
cl_int *errcode_ret);
cl_int RetainProgram(Thread *thread, cl_program program);
cl_int ReleaseProgram(Thread *thread, cl_program program);
cl_int BuildProgram(Thread *thread,
cl_program program,
cl_int RetainProgram(cl_program program);
cl_int ReleaseProgram(cl_program program);
cl_int BuildProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data);
cl_int CompileProgram(Thread *thread,
cl_program program,
cl_int CompileProgram(cl_program program,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
@ -234,8 +194,7 @@ cl_int CompileProgram(Thread *thread,
const char **header_include_names,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data);
cl_program LinkProgram(Thread *thread,
cl_context context,
cl_program LinkProgram(cl_context context,
cl_uint num_devices,
const cl_device_id *device_list,
const char *options,
@ -244,77 +203,57 @@ cl_program LinkProgram(Thread *thread,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data,
cl_int *errcode_ret);
cl_int SetProgramReleaseCallback(Thread *thread,
cl_program program,
cl_int SetProgramReleaseCallback(cl_program program,
void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data),
void *user_data);
cl_int SetProgramSpecializationConstant(Thread *thread,
cl_program program,
cl_int SetProgramSpecializationConstant(cl_program program,
cl_uint spec_id,
size_t spec_size,
const void *spec_value);
cl_int UnloadPlatformCompiler(Thread *thread, cl_platform_id platform);
cl_int GetProgramInfo(Thread *thread,
cl_program program,
cl_int UnloadPlatformCompiler(cl_platform_id platform);
cl_int GetProgramInfo(cl_program program,
cl_program_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetProgramBuildInfo(Thread *thread,
cl_program program,
cl_int GetProgramBuildInfo(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_kernel CreateKernel(Thread *thread,
cl_program program,
const char *kernel_name,
cl_int *errcode_ret);
cl_int CreateKernelsInProgram(Thread *thread,
cl_program program,
cl_kernel CreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret);
cl_int CreateKernelsInProgram(cl_program program,
cl_uint num_kernels,
cl_kernel *kernels,
cl_uint *num_kernels_ret);
cl_kernel CloneKernel(Thread *thread, cl_kernel source_kernel, cl_int *errcode_ret);
cl_int RetainKernel(Thread *thread, cl_kernel kernel);
cl_int ReleaseKernel(Thread *thread, cl_kernel kernel);
cl_int SetKernelArg(Thread *thread,
cl_kernel kernel,
cl_uint arg_index,
size_t arg_size,
const void *arg_value);
cl_int SetKernelArgSVMPointer(Thread *thread,
cl_kernel kernel,
cl_uint arg_index,
const void *arg_value);
cl_int SetKernelExecInfo(Thread *thread,
cl_kernel kernel,
cl_kernel CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret);
cl_int RetainKernel(cl_kernel kernel);
cl_int ReleaseKernel(cl_kernel kernel);
cl_int SetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value);
cl_int SetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void *arg_value);
cl_int SetKernelExecInfo(cl_kernel kernel,
cl_kernel_exec_info param_name,
size_t param_value_size,
const void *param_value);
cl_int GetKernelInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelInfo(cl_kernel kernel,
cl_kernel_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int GetKernelArgInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelArgInfo(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 GetKernelWorkGroupInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelWorkGroupInfo(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 GetKernelSubGroupInfo(Thread *thread,
cl_kernel kernel,
cl_int GetKernelSubGroupInfo(cl_kernel kernel,
cl_device_id device,
cl_kernel_sub_group_info param_name,
size_t input_value_size,
@ -322,34 +261,30 @@ cl_int GetKernelSubGroupInfo(Thread *thread,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int WaitForEvents(Thread *thread, cl_uint num_events, const cl_event *event_list);
cl_int GetEventInfo(Thread *thread,
cl_event event,
cl_int WaitForEvents(cl_uint num_events, const cl_event *event_list);
cl_int GetEventInfo(cl_event event,
cl_event_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_event CreateUserEvent(Thread *thread, cl_context context, cl_int *errcode_ret);
cl_int RetainEvent(Thread *thread, cl_event event);
cl_int ReleaseEvent(Thread *thread, cl_event event);
cl_int SetUserEventStatus(Thread *thread, cl_event event, cl_int execution_status);
cl_int SetEventCallback(Thread *thread,
cl_event event,
cl_event CreateUserEvent(cl_context context, cl_int *errcode_ret);
cl_int RetainEvent(cl_event event);
cl_int ReleaseEvent(cl_event event);
cl_int SetUserEventStatus(cl_event event, cl_int execution_status);
cl_int SetEventCallback(cl_event event,
cl_int command_exec_callback_type,
void(CL_CALLBACK *pfn_notify)(cl_event event,
cl_int event_command_status,
void *user_data),
void *user_data);
cl_int GetEventProfilingInfo(Thread *thread,
cl_event event,
cl_int GetEventProfilingInfo(cl_event event,
cl_profiling_info param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
cl_int Flush(Thread *thread, cl_command_queue command_queue);
cl_int Finish(Thread *thread, cl_command_queue command_queue);
cl_int EnqueueReadBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int Flush(cl_command_queue command_queue);
cl_int Finish(cl_command_queue command_queue);
cl_int EnqueueReadBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
size_t offset,
@ -358,8 +293,7 @@ cl_int EnqueueReadBuffer(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueReadBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueReadBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_read,
const size_t *buffer_origin,
@ -373,8 +307,7 @@ cl_int EnqueueReadBufferRect(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueWriteBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
size_t offset,
@ -383,8 +316,7 @@ cl_int EnqueueWriteBuffer(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueWriteBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteBufferRect(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_write,
const size_t *buffer_origin,
@ -398,8 +330,7 @@ cl_int EnqueueWriteBufferRect(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueFillBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueFillBuffer(cl_command_queue command_queue,
cl_mem buffer,
const void *pattern,
size_t pattern_size,
@ -408,8 +339,7 @@ cl_int EnqueueFillBuffer(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueCopyBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBuffer(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
size_t src_offset,
@ -418,8 +348,7 @@ cl_int EnqueueCopyBuffer(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueCopyBufferRect(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBufferRect(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_buffer,
const size_t *src_origin,
@ -432,8 +361,7 @@ cl_int EnqueueCopyBufferRect(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueReadImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueReadImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_read,
const size_t *origin,
@ -444,8 +372,7 @@ cl_int EnqueueReadImage(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueWriteImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueWriteImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_write,
const size_t *origin,
@ -456,8 +383,7 @@ cl_int EnqueueWriteImage(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueFillImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueFillImage(cl_command_queue command_queue,
cl_mem image,
const void *fill_color,
const size_t *origin,
@ -465,8 +391,7 @@ cl_int EnqueueFillImage(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueCopyImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyImage(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_image,
const size_t *src_origin,
@ -475,8 +400,7 @@ cl_int EnqueueCopyImage(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueCopyImageToBuffer(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyImageToBuffer(cl_command_queue command_queue,
cl_mem src_image,
cl_mem dst_buffer,
const size_t *src_origin,
@ -485,8 +409,7 @@ cl_int EnqueueCopyImageToBuffer(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueCopyBufferToImage(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueCopyBufferToImage(cl_command_queue command_queue,
cl_mem src_buffer,
cl_mem dst_image,
size_t src_offset,
@ -495,8 +418,7 @@ cl_int EnqueueCopyBufferToImage(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
void *EnqueueMapBuffer(Thread *thread,
cl_command_queue command_queue,
void *EnqueueMapBuffer(cl_command_queue command_queue,
cl_mem buffer,
cl_bool blocking_map,
cl_map_flags map_flags,
@ -506,8 +428,7 @@ void *EnqueueMapBuffer(Thread *thread,
const cl_event *event_wait_list,
cl_event *event,
cl_int *errcode_ret);
void *EnqueueMapImage(Thread *thread,
cl_command_queue command_queue,
void *EnqueueMapImage(cl_command_queue command_queue,
cl_mem image,
cl_bool blocking_map,
cl_map_flags map_flags,
@ -519,23 +440,20 @@ void *EnqueueMapImage(Thread *thread,
const cl_event *event_wait_list,
cl_event *event,
cl_int *errcode_ret);
cl_int EnqueueUnmapMemObject(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueUnmapMemObject(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 EnqueueMigrateMemObjects(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueMigrateMemObjects(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 EnqueueNDRangeKernel(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueNDRangeKernel(cl_command_queue command_queue,
cl_kernel kernel,
cl_uint work_dim,
const size_t *global_work_offset,
@ -544,8 +462,7 @@ cl_int EnqueueNDRangeKernel(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueNativeKernel(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueNativeKernel(cl_command_queue command_queue,
void(CL_CALLBACK *user_func)(void *),
void *args,
size_t cb_args,
@ -555,18 +472,15 @@ cl_int EnqueueNativeKernel(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueMarkerWithWaitList(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueMarkerWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueBarrierWithWaitList(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueBarrierWithWaitList(cl_command_queue command_queue,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMFree(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMFree(cl_command_queue command_queue,
cl_uint num_svm_pointers,
void *svm_pointers[],
void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,
@ -577,8 +491,7 @@ cl_int EnqueueSVMFree(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMMemcpy(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMemcpy(cl_command_queue command_queue,
cl_bool blocking_copy,
void *dst_ptr,
const void *src_ptr,
@ -586,8 +499,7 @@ cl_int EnqueueSVMMemcpy(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMMemFill(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMemFill(cl_command_queue command_queue,
void *svm_ptr,
const void *pattern,
size_t pattern_size,
@ -595,8 +507,7 @@ cl_int EnqueueSVMMemFill(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMMap(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMap(cl_command_queue command_queue,
cl_bool blocking_map,
cl_map_flags flags,
void *svm_ptr,
@ -604,14 +515,12 @@ cl_int EnqueueSVMMap(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMUnmap(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMUnmap(cl_command_queue command_queue,
void *svm_ptr,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
cl_int EnqueueSVMMigrateMem(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueSVMMigrateMem(cl_command_queue command_queue,
cl_uint num_svm_pointers,
const void **svm_pointers,
const size_t *sizes,
@ -619,16 +528,12 @@ cl_int EnqueueSVMMigrateMem(Thread *thread,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event);
void *GetExtensionFunctionAddressForPlatform(Thread *thread,
cl_platform_id platform,
const char *func_name);
cl_int SetCommandQueueProperty(Thread *thread,
cl_command_queue command_queue,
void *GetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char *func_name);
cl_int SetCommandQueueProperty(cl_command_queue command_queue,
cl_command_queue_properties properties,
cl_bool enable,
cl_command_queue_properties *old_properties);
cl_mem CreateImage2D(Thread *thread,
cl_context context,
cl_mem CreateImage2D(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
size_t image_width,
@ -636,8 +541,7 @@ cl_mem CreateImage2D(Thread *thread,
size_t image_row_pitch,
void *host_ptr,
cl_int *errcode_ret);
cl_mem CreateImage3D(Thread *thread,
cl_context context,
cl_mem CreateImage3D(cl_context context,
cl_mem_flags flags,
const cl_image_format *image_format,
size_t image_width,
@ -647,27 +551,23 @@ cl_mem CreateImage3D(Thread *thread,
size_t image_slice_pitch,
void *host_ptr,
cl_int *errcode_ret);
cl_int EnqueueMarker(Thread *thread, cl_command_queue command_queue, cl_event *event);
cl_int EnqueueWaitForEvents(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueMarker(cl_command_queue command_queue, cl_event *event);
cl_int EnqueueWaitForEvents(cl_command_queue command_queue,
cl_uint num_events,
const cl_event *event_list);
cl_int EnqueueBarrier(Thread *thread, cl_command_queue command_queue);
cl_int UnloadCompiler(Thread *thread);
void *GetExtensionFunctionAddress(Thread *thread, const char *func_name);
cl_command_queue CreateCommandQueue(Thread *thread,
cl_context context,
cl_int EnqueueBarrier(cl_command_queue command_queue);
cl_int UnloadCompiler();
void *GetExtensionFunctionAddress(const char *func_name);
cl_command_queue CreateCommandQueue(cl_context context,
cl_device_id device,
cl_command_queue_properties properties,
cl_int *errcode_ret);
cl_sampler CreateSampler(Thread *thread,
cl_context context,
cl_sampler CreateSampler(cl_context context,
cl_bool normalized_coords,
cl_addressing_mode addressing_mode,
cl_filter_mode filter_mode,
cl_int *errcode_ret);
cl_int EnqueueTask(Thread *thread,
cl_command_queue command_queue,
cl_int EnqueueTask(cl_command_queue command_queue,
cl_kernel kernel,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,

Просмотреть файл

@ -9,6 +9,8 @@
// Defines the CL entry points.
#include "entry_points_cl_autogen.h"
#include "cl_stubs_autogen.h"
#include "entry_points_cl_utils.h"
extern "C" {
@ -24,7 +26,7 @@ cl_int CL_API_CALL CL_GetPlatformIDs(cl_uint num_entries,
// TODO: GetPlatformIDs
return (cl_int)0;
return cl::GetPlatformIDs(num_entries, platforms, num_platforms);
}
cl_int CL_API_CALL CL_GetPlatformInfo(cl_platform_id platform,
@ -42,7 +44,8 @@ cl_int CL_API_CALL CL_GetPlatformInfo(cl_platform_id platform,
// TODO: GetPlatformInfo
return (cl_int)0;
return cl::GetPlatformInfo(platform, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_GetDeviceIDs(cl_platform_id platform,
@ -60,7 +63,7 @@ cl_int CL_API_CALL CL_GetDeviceIDs(cl_platform_id platform,
// TODO: GetDeviceIDs
return (cl_int)0;
return cl::GetDeviceIDs(platform, device_type, num_entries, devices, num_devices);
}
cl_int CL_API_CALL CL_GetDeviceInfo(cl_device_id device,
@ -78,7 +81,8 @@ cl_int CL_API_CALL CL_GetDeviceInfo(cl_device_id device,
// TODO: GetDeviceInfo
return (cl_int)0;
return cl::GetDeviceInfo(device, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_context CL_API_CALL CL_CreateContext(const cl_context_properties *properties,
@ -100,7 +104,7 @@ cl_context CL_API_CALL CL_CreateContext(const cl_context_properties *properties,
// TODO: CreateContext
return (cl_context)0;
return cl::CreateContext(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
}
cl_context CL_API_CALL
@ -121,7 +125,7 @@ CL_CreateContextFromType(const cl_context_properties *properties,
// TODO: CreateContextFromType
return (cl_context)0;
return cl::CreateContextFromType(properties, device_type, pfn_notify, user_data, errcode_ret);
}
cl_int CL_API_CALL CL_RetainContext(cl_context context)
@ -130,7 +134,7 @@ cl_int CL_API_CALL CL_RetainContext(cl_context context)
// TODO: RetainContext
return (cl_int)0;
return cl::RetainContext(context);
}
cl_int CL_API_CALL CL_ReleaseContext(cl_context context)
@ -139,7 +143,7 @@ cl_int CL_API_CALL CL_ReleaseContext(cl_context context)
// TODO: ReleaseContext
return (cl_int)0;
return cl::ReleaseContext(context);
}
cl_int CL_API_CALL CL_GetContextInfo(cl_context context,
@ -157,7 +161,8 @@ cl_int CL_API_CALL CL_GetContextInfo(cl_context context,
// TODO: GetContextInfo
return (cl_int)0;
return cl::GetContextInfo(context, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_RetainCommandQueue(cl_command_queue command_queue)
@ -166,7 +171,7 @@ cl_int CL_API_CALL CL_RetainCommandQueue(cl_command_queue command_queue)
// TODO: RetainCommandQueue
return (cl_int)0;
return cl::RetainCommandQueue(command_queue);
}
cl_int CL_API_CALL CL_ReleaseCommandQueue(cl_command_queue command_queue)
@ -175,7 +180,7 @@ cl_int CL_API_CALL CL_ReleaseCommandQueue(cl_command_queue command_queue)
// TODO: ReleaseCommandQueue
return (cl_int)0;
return cl::ReleaseCommandQueue(command_queue);
}
cl_int CL_API_CALL CL_GetCommandQueueInfo(cl_command_queue command_queue,
@ -193,7 +198,8 @@ cl_int CL_API_CALL CL_GetCommandQueueInfo(cl_command_queue command_queue,
// TODO: GetCommandQueueInfo
return (cl_int)0;
return cl::GetCommandQueueInfo(command_queue, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_mem CL_API_CALL CL_CreateBuffer(cl_context context,
@ -209,7 +215,7 @@ cl_mem CL_API_CALL CL_CreateBuffer(cl_context context,
// TODO: CreateBuffer
return (cl_mem)0;
return cl::CreateBuffer(context, flags, size, host_ptr, errcode_ret);
}
cl_int CL_API_CALL CL_RetainMemObject(cl_mem memobj)
@ -218,7 +224,7 @@ cl_int CL_API_CALL CL_RetainMemObject(cl_mem memobj)
// TODO: RetainMemObject
return (cl_int)0;
return cl::RetainMemObject(memobj);
}
cl_int CL_API_CALL CL_ReleaseMemObject(cl_mem memobj)
@ -227,7 +233,7 @@ cl_int CL_API_CALL CL_ReleaseMemObject(cl_mem memobj)
// TODO: ReleaseMemObject
return (cl_int)0;
return cl::ReleaseMemObject(memobj);
}
cl_int CL_API_CALL CL_GetSupportedImageFormats(cl_context context,
@ -246,7 +252,8 @@ cl_int CL_API_CALL CL_GetSupportedImageFormats(cl_context context,
// TODO: GetSupportedImageFormats
return (cl_int)0;
return cl::GetSupportedImageFormats(context, flags, image_type, num_entries, image_formats,
num_image_formats);
}
cl_int CL_API_CALL CL_GetMemObjectInfo(cl_mem memobj,
@ -264,7 +271,8 @@ cl_int CL_API_CALL CL_GetMemObjectInfo(cl_mem memobj,
// TODO: GetMemObjectInfo
return (cl_int)0;
return cl::GetMemObjectInfo(memobj, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_GetImageInfo(cl_mem image,
@ -282,7 +290,7 @@ cl_int CL_API_CALL CL_GetImageInfo(cl_mem image,
// TODO: GetImageInfo
return (cl_int)0;
return cl::GetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL CL_RetainSampler(cl_sampler sampler)
@ -291,7 +299,7 @@ cl_int CL_API_CALL CL_RetainSampler(cl_sampler sampler)
// TODO: RetainSampler
return (cl_int)0;
return cl::RetainSampler(sampler);
}
cl_int CL_API_CALL CL_ReleaseSampler(cl_sampler sampler)
@ -300,7 +308,7 @@ cl_int CL_API_CALL CL_ReleaseSampler(cl_sampler sampler)
// TODO: ReleaseSampler
return (cl_int)0;
return cl::ReleaseSampler(sampler);
}
cl_int CL_API_CALL CL_GetSamplerInfo(cl_sampler sampler,
@ -318,7 +326,8 @@ cl_int CL_API_CALL CL_GetSamplerInfo(cl_sampler sampler,
// TODO: GetSamplerInfo
return (cl_int)0;
return cl::GetSamplerInfo(sampler, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_program CL_API_CALL CL_CreateProgramWithSource(cl_context context,
@ -335,7 +344,7 @@ cl_program CL_API_CALL CL_CreateProgramWithSource(cl_context context,
// TODO: CreateProgramWithSource
return (cl_program)0;
return cl::CreateProgramWithSource(context, count, strings, lengths, errcode_ret);
}
cl_program CL_API_CALL CL_CreateProgramWithBinary(cl_context context,
@ -355,7 +364,8 @@ cl_program CL_API_CALL CL_CreateProgramWithBinary(cl_context context,
// TODO: CreateProgramWithBinary
return (cl_program)0;
return cl::CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries,
binary_status, errcode_ret);
}
cl_int CL_API_CALL CL_RetainProgram(cl_program program)
@ -364,7 +374,7 @@ cl_int CL_API_CALL CL_RetainProgram(cl_program program)
// TODO: RetainProgram
return (cl_int)0;
return cl::RetainProgram(program);
}
cl_int CL_API_CALL CL_ReleaseProgram(cl_program program)
@ -373,7 +383,7 @@ cl_int CL_API_CALL CL_ReleaseProgram(cl_program program)
// TODO: ReleaseProgram
return (cl_int)0;
return cl::ReleaseProgram(program);
}
cl_int CL_API_CALL CL_BuildProgram(cl_program program,
@ -393,7 +403,7 @@ cl_int CL_API_CALL CL_BuildProgram(cl_program program,
// TODO: BuildProgram
return (cl_int)0;
return cl::BuildProgram(program, num_devices, device_list, options, pfn_notify, user_data);
}
cl_int CL_API_CALL CL_GetProgramInfo(cl_program program,
@ -411,7 +421,8 @@ cl_int CL_API_CALL CL_GetProgramInfo(cl_program program,
// TODO: GetProgramInfo
return (cl_int)0;
return cl::GetProgramInfo(program, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_GetProgramBuildInfo(cl_program program,
@ -430,7 +441,8 @@ cl_int CL_API_CALL CL_GetProgramBuildInfo(cl_program program,
// TODO: GetProgramBuildInfo
return (cl_int)0;
return cl::GetProgramBuildInfo(program, device, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_kernel CL_API_CALL CL_CreateKernel(cl_program program,
@ -444,7 +456,7 @@ cl_kernel CL_API_CALL CL_CreateKernel(cl_program program,
// TODO: CreateKernel
return (cl_kernel)0;
return cl::CreateKernel(program, kernel_name, errcode_ret);
}
cl_int CL_API_CALL CL_CreateKernelsInProgram(cl_program program,
@ -459,7 +471,7 @@ cl_int CL_API_CALL CL_CreateKernelsInProgram(cl_program program,
// TODO: CreateKernelsInProgram
return (cl_int)0;
return cl::CreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret);
}
cl_int CL_API_CALL CL_RetainKernel(cl_kernel kernel)
@ -468,7 +480,7 @@ cl_int CL_API_CALL CL_RetainKernel(cl_kernel kernel)
// TODO: RetainKernel
return (cl_int)0;
return cl::RetainKernel(kernel);
}
cl_int CL_API_CALL CL_ReleaseKernel(cl_kernel kernel)
@ -477,7 +489,7 @@ cl_int CL_API_CALL CL_ReleaseKernel(cl_kernel kernel)
// TODO: ReleaseKernel
return (cl_int)0;
return cl::ReleaseKernel(kernel);
}
cl_int CL_API_CALL CL_SetKernelArg(cl_kernel kernel,
@ -492,7 +504,7 @@ cl_int CL_API_CALL CL_SetKernelArg(cl_kernel kernel,
// TODO: SetKernelArg
return (cl_int)0;
return cl::SetKernelArg(kernel, arg_index, arg_size, arg_value);
}
cl_int CL_API_CALL CL_GetKernelInfo(cl_kernel kernel,
@ -510,7 +522,8 @@ cl_int CL_API_CALL CL_GetKernelInfo(cl_kernel kernel,
// TODO: GetKernelInfo
return (cl_int)0;
return cl::GetKernelInfo(kernel, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_GetKernelWorkGroupInfo(cl_kernel kernel,
@ -529,7 +542,8 @@ cl_int CL_API_CALL CL_GetKernelWorkGroupInfo(cl_kernel kernel,
// TODO: GetKernelWorkGroupInfo
return (cl_int)0;
return cl::GetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_WaitForEvents(cl_uint num_events, const cl_event *event_list)
@ -539,7 +553,7 @@ cl_int CL_API_CALL CL_WaitForEvents(cl_uint num_events, const cl_event *event_li
// TODO: WaitForEvents
return (cl_int)0;
return cl::WaitForEvents(num_events, event_list);
}
cl_int CL_API_CALL CL_GetEventInfo(cl_event event,
@ -557,7 +571,7 @@ cl_int CL_API_CALL CL_GetEventInfo(cl_event event,
// TODO: GetEventInfo
return (cl_int)0;
return cl::GetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL CL_RetainEvent(cl_event event)
@ -566,7 +580,7 @@ cl_int CL_API_CALL CL_RetainEvent(cl_event event)
// TODO: RetainEvent
return (cl_int)0;
return cl::RetainEvent(event);
}
cl_int CL_API_CALL CL_ReleaseEvent(cl_event event)
@ -575,7 +589,7 @@ cl_int CL_API_CALL CL_ReleaseEvent(cl_event event)
// TODO: ReleaseEvent
return (cl_int)0;
return cl::ReleaseEvent(event);
}
cl_int CL_API_CALL CL_GetEventProfilingInfo(cl_event event,
@ -593,7 +607,8 @@ cl_int CL_API_CALL CL_GetEventProfilingInfo(cl_event event,
// TODO: GetEventProfilingInfo
return (cl_int)0;
return cl::GetEventProfilingInfo(event, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_Flush(cl_command_queue command_queue)
@ -602,7 +617,7 @@ cl_int CL_API_CALL CL_Flush(cl_command_queue command_queue)
// TODO: Flush
return (cl_int)0;
return cl::Flush(command_queue);
}
cl_int CL_API_CALL CL_Finish(cl_command_queue command_queue)
@ -611,7 +626,7 @@ cl_int CL_API_CALL CL_Finish(cl_command_queue command_queue)
// TODO: Finish
return (cl_int)0;
return cl::Finish(command_queue);
}
cl_int CL_API_CALL CL_EnqueueReadBuffer(cl_command_queue command_queue,
@ -634,7 +649,8 @@ cl_int CL_API_CALL CL_EnqueueReadBuffer(cl_command_queue command_queue,
// TODO: EnqueueReadBuffer
return (cl_int)0;
return cl::EnqueueReadBuffer(command_queue, buffer, blocking_read, offset, size, ptr,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueWriteBuffer(cl_command_queue command_queue,
@ -657,7 +673,8 @@ cl_int CL_API_CALL CL_EnqueueWriteBuffer(cl_command_queue command_queue,
// TODO: EnqueueWriteBuffer
return (cl_int)0;
return cl::EnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, size, ptr,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueCopyBuffer(cl_command_queue command_queue,
@ -681,7 +698,8 @@ cl_int CL_API_CALL CL_EnqueueCopyBuffer(cl_command_queue command_queue,
// TODO: EnqueueCopyBuffer
return (cl_int)0;
return cl::EnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset,
size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueReadImage(cl_command_queue command_queue,
@ -708,7 +726,8 @@ cl_int CL_API_CALL CL_EnqueueReadImage(cl_command_queue command_queue,
// TODO: EnqueueReadImage
return (cl_int)0;
return cl::EnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch,
slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueWriteImage(cl_command_queue command_queue,
@ -735,7 +754,9 @@ cl_int CL_API_CALL CL_EnqueueWriteImage(cl_command_queue command_queue,
// TODO: EnqueueWriteImage
return (cl_int)0;
return cl::EnqueueWriteImage(command_queue, image, blocking_write, origin, region,
input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list,
event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueCopyImage(cl_command_queue command_queue,
@ -760,7 +781,8 @@ cl_int CL_API_CALL CL_EnqueueCopyImage(cl_command_queue command_queue,
// TODO: EnqueueCopyImage
return (cl_int)0;
return cl::EnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueCopyImageToBuffer(cl_command_queue command_queue,
@ -785,7 +807,9 @@ cl_int CL_API_CALL CL_EnqueueCopyImageToBuffer(cl_command_queue command_queue,
// TODO: EnqueueCopyImageToBuffer
return (cl_int)0;
return cl::EnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region,
dst_offset, num_events_in_wait_list, event_wait_list,
event);
}
cl_int CL_API_CALL CL_EnqueueCopyBufferToImage(cl_command_queue command_queue,
@ -810,7 +834,9 @@ cl_int CL_API_CALL CL_EnqueueCopyBufferToImage(cl_command_queue command_queue,
// TODO: EnqueueCopyBufferToImage
return (cl_int)0;
return cl::EnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset,
dst_origin, region, num_events_in_wait_list,
event_wait_list, event);
}
void *CL_API_CALL CL_EnqueueMapBuffer(cl_command_queue command_queue,
@ -835,7 +861,8 @@ void *CL_API_CALL CL_EnqueueMapBuffer(cl_command_queue command_queue,
// TODO: EnqueueMapBuffer
return (void *)0;
return cl::EnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, size,
num_events_in_wait_list, event_wait_list, event, errcode_ret);
}
void *CL_API_CALL CL_EnqueueMapImage(cl_command_queue command_queue,
@ -865,7 +892,9 @@ void *CL_API_CALL CL_EnqueueMapImage(cl_command_queue command_queue,
// TODO: EnqueueMapImage
return (void *)0;
return cl::EnqueueMapImage(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);
}
cl_int CL_API_CALL CL_EnqueueUnmapMemObject(cl_command_queue command_queue,
@ -885,7 +914,8 @@ cl_int CL_API_CALL CL_EnqueueUnmapMemObject(cl_command_queue command_queue,
// TODO: EnqueueUnmapMemObject
return (cl_int)0;
return cl::EnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list,
event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueNDRangeKernel(cl_command_queue command_queue,
@ -910,7 +940,9 @@ cl_int CL_API_CALL CL_EnqueueNDRangeKernel(cl_command_queue command_queue,
// TODO: EnqueueNDRangeKernel
return (cl_int)0;
return cl::EnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset,
global_work_size, local_work_size, num_events_in_wait_list,
event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueNativeKernel(cl_command_queue command_queue,
@ -937,7 +969,9 @@ cl_int CL_API_CALL CL_EnqueueNativeKernel(cl_command_queue command_queue,
// TODO: EnqueueNativeKernel
return (cl_int)0;
return cl::EnqueueNativeKernel(command_queue, user_func, args, cb_args, num_mem_objects,
mem_list, args_mem_loc, num_events_in_wait_list, event_wait_list,
event);
}
cl_int CL_API_CALL CL_SetCommandQueueProperty(cl_command_queue command_queue,
@ -952,7 +986,7 @@ cl_int CL_API_CALL CL_SetCommandQueueProperty(cl_command_queue command_queue,
// TODO: SetCommandQueueProperty
return (cl_int)0;
return cl::SetCommandQueueProperty(command_queue, properties, enable, old_properties);
}
cl_mem CL_API_CALL CL_CreateImage2D(cl_context context,
@ -974,7 +1008,8 @@ cl_mem CL_API_CALL CL_CreateImage2D(cl_context context,
// TODO: CreateImage2D
return (cl_mem)0;
return cl::CreateImage2D(context, flags, image_format, image_width, image_height,
image_row_pitch, host_ptr, errcode_ret);
}
cl_mem CL_API_CALL CL_CreateImage3D(cl_context context,
@ -998,7 +1033,8 @@ cl_mem CL_API_CALL CL_CreateImage3D(cl_context context,
// TODO: CreateImage3D
return (cl_mem)0;
return cl::CreateImage3D(context, flags, image_format, image_width, image_height, image_depth,
image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
}
cl_int CL_API_CALL CL_EnqueueMarker(cl_command_queue command_queue, cl_event *event)
@ -1008,7 +1044,7 @@ cl_int CL_API_CALL CL_EnqueueMarker(cl_command_queue command_queue, cl_event *ev
// TODO: EnqueueMarker
return (cl_int)0;
return cl::EnqueueMarker(command_queue, event);
}
cl_int CL_API_CALL CL_EnqueueWaitForEvents(cl_command_queue command_queue,
@ -1021,7 +1057,7 @@ cl_int CL_API_CALL CL_EnqueueWaitForEvents(cl_command_queue command_queue,
// TODO: EnqueueWaitForEvents
return (cl_int)0;
return cl::EnqueueWaitForEvents(command_queue, num_events, event_list);
}
cl_int CL_API_CALL CL_EnqueueBarrier(cl_command_queue command_queue)
@ -1030,7 +1066,7 @@ cl_int CL_API_CALL CL_EnqueueBarrier(cl_command_queue command_queue)
// TODO: EnqueueBarrier
return (cl_int)0;
return cl::EnqueueBarrier(command_queue);
}
cl_int CL_API_CALL CL_UnloadCompiler()
@ -1039,7 +1075,7 @@ cl_int CL_API_CALL CL_UnloadCompiler()
// TODO: UnloadCompiler
return (cl_int)0;
return cl::UnloadCompiler();
}
void *CL_API_CALL CL_GetExtensionFunctionAddress(const char *func_name)
@ -1048,7 +1084,7 @@ void *CL_API_CALL CL_GetExtensionFunctionAddress(const char *func_name)
// TODO: GetExtensionFunctionAddress
return (void *)0;
return cl::GetExtensionFunctionAddress(func_name);
}
cl_command_queue CL_API_CALL CL_CreateCommandQueue(cl_context context,
@ -1063,7 +1099,7 @@ cl_command_queue CL_API_CALL CL_CreateCommandQueue(cl_context context,
// TODO: CreateCommandQueue
return (cl_command_queue)0;
return cl::CreateCommandQueue(context, device, properties, errcode_ret);
}
cl_sampler CL_API_CALL CL_CreateSampler(cl_context context,
@ -1081,7 +1117,7 @@ cl_sampler CL_API_CALL CL_CreateSampler(cl_context context,
// TODO: CreateSampler
return (cl_sampler)0;
return cl::CreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
}
cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
@ -1099,7 +1135,7 @@ cl_int CL_API_CALL CL_EnqueueTask(cl_command_queue command_queue,
// TODO: EnqueueTask
return (cl_int)0;
return cl::EnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
}
// CL 1.1
@ -1118,7 +1154,7 @@ cl_mem CL_API_CALL CL_CreateSubBuffer(cl_mem buffer,
// TODO: CreateSubBuffer
return (cl_mem)0;
return cl::CreateSubBuffer(buffer, flags, buffer_create_type, buffer_create_info, errcode_ret);
}
cl_int CL_API_CALL CL_SetMemObjectDestructorCallback(cl_mem memobj,
@ -1133,7 +1169,7 @@ cl_int CL_API_CALL CL_SetMemObjectDestructorCallback(cl_mem memobj,
// TODO: SetMemObjectDestructorCallback
return (cl_int)0;
return cl::SetMemObjectDestructorCallback(memobj, pfn_notify, user_data);
}
cl_event CL_API_CALL CL_CreateUserEvent(cl_context context, cl_int *errcode_ret)
@ -1143,7 +1179,7 @@ cl_event CL_API_CALL CL_CreateUserEvent(cl_context context, cl_int *errcode_ret)
// TODO: CreateUserEvent
return (cl_event)0;
return cl::CreateUserEvent(context, errcode_ret);
}
cl_int CL_API_CALL CL_SetUserEventStatus(cl_event event, cl_int execution_status)
@ -1153,7 +1189,7 @@ cl_int CL_API_CALL CL_SetUserEventStatus(cl_event event, cl_int execution_status
// TODO: SetUserEventStatus
return (cl_int)0;
return cl::SetUserEventStatus(event, execution_status);
}
cl_int CL_API_CALL CL_SetEventCallback(cl_event event,
@ -1171,7 +1207,7 @@ cl_int CL_API_CALL CL_SetEventCallback(cl_event event,
// TODO: SetEventCallback
return (cl_int)0;
return cl::SetEventCallback(event, command_exec_callback_type, pfn_notify, user_data);
}
cl_int CL_API_CALL CL_EnqueueReadBufferRect(cl_command_queue command_queue,
@ -1204,7 +1240,10 @@ cl_int CL_API_CALL CL_EnqueueReadBufferRect(cl_command_queue command_queue,
// TODO: EnqueueReadBufferRect
return (cl_int)0;
return cl::EnqueueReadBufferRect(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);
}
cl_int CL_API_CALL CL_EnqueueWriteBufferRect(cl_command_queue command_queue,
@ -1237,7 +1276,10 @@ cl_int CL_API_CALL CL_EnqueueWriteBufferRect(cl_command_queue command_queue,
// TODO: EnqueueWriteBufferRect
return (cl_int)0;
return cl::EnqueueWriteBufferRect(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);
}
cl_int CL_API_CALL CL_EnqueueCopyBufferRect(cl_command_queue command_queue,
@ -1268,7 +1310,10 @@ cl_int CL_API_CALL CL_EnqueueCopyBufferRect(cl_command_queue command_queue,
// TODO: EnqueueCopyBufferRect
return (cl_int)0;
return cl::EnqueueCopyBufferRect(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);
}
// CL 1.2
@ -1287,7 +1332,7 @@ cl_int CL_API_CALL CL_CreateSubDevices(cl_device_id in_device,
// TODO: CreateSubDevices
return (cl_int)0;
return cl::CreateSubDevices(in_device, properties, num_devices, out_devices, num_devices_ret);
}
cl_int CL_API_CALL CL_RetainDevice(cl_device_id device)
@ -1296,7 +1341,7 @@ cl_int CL_API_CALL CL_RetainDevice(cl_device_id device)
// TODO: RetainDevice
return (cl_int)0;
return cl::RetainDevice(device);
}
cl_int CL_API_CALL CL_ReleaseDevice(cl_device_id device)
@ -1305,7 +1350,7 @@ cl_int CL_API_CALL CL_ReleaseDevice(cl_device_id device)
// TODO: ReleaseDevice
return (cl_int)0;
return cl::ReleaseDevice(device);
}
cl_mem CL_API_CALL CL_CreateImage(cl_context context,
@ -1324,7 +1369,7 @@ cl_mem CL_API_CALL CL_CreateImage(cl_context context,
// TODO: CreateImage
return (cl_mem)0;
return cl::CreateImage(context, flags, image_format, image_desc, host_ptr, errcode_ret);
}
cl_program CL_API_CALL CL_CreateProgramWithBuiltInKernels(cl_context context,
@ -1341,7 +1386,8 @@ cl_program CL_API_CALL CL_CreateProgramWithBuiltInKernels(cl_context context,
// TODO: CreateProgramWithBuiltInKernels
return (cl_program)0;
return cl::CreateProgramWithBuiltInKernels(context, num_devices, device_list, kernel_names,
errcode_ret);
}
cl_int CL_API_CALL CL_CompileProgram(cl_program program,
@ -1366,7 +1412,8 @@ cl_int CL_API_CALL CL_CompileProgram(cl_program program,
// TODO: CompileProgram
return (cl_int)0;
return cl::CompileProgram(program, num_devices, device_list, options, num_input_headers,
input_headers, header_include_names, pfn_notify, user_data);
}
cl_program CL_API_CALL CL_LinkProgram(cl_context context,
@ -1392,7 +1439,8 @@ cl_program CL_API_CALL CL_LinkProgram(cl_context context,
// TODO: LinkProgram
return (cl_program)0;
return cl::LinkProgram(context, num_devices, device_list, options, num_input_programs,
input_programs, pfn_notify, user_data, errcode_ret);
}
cl_int CL_API_CALL CL_UnloadPlatformCompiler(cl_platform_id platform)
@ -1401,7 +1449,7 @@ cl_int CL_API_CALL CL_UnloadPlatformCompiler(cl_platform_id platform)
// TODO: UnloadPlatformCompiler
return (cl_int)0;
return cl::UnloadPlatformCompiler(platform);
}
cl_int CL_API_CALL CL_GetKernelArgInfo(cl_kernel kernel,
@ -1421,7 +1469,8 @@ cl_int CL_API_CALL CL_GetKernelArgInfo(cl_kernel kernel,
// TODO: GetKernelArgInfo
return (cl_int)0;
return cl::GetKernelArgInfo(kernel, arg_index, param_name, param_value_size, param_value,
param_value_size_ret);
}
cl_int CL_API_CALL CL_EnqueueFillBuffer(cl_command_queue command_queue,
@ -1444,7 +1493,8 @@ cl_int CL_API_CALL CL_EnqueueFillBuffer(cl_command_queue command_queue,
// TODO: EnqueueFillBuffer
return (cl_int)0;
return cl::EnqueueFillBuffer(command_queue, buffer, pattern, pattern_size, offset, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueFillImage(cl_command_queue command_queue,
@ -1467,7 +1517,8 @@ cl_int CL_API_CALL CL_EnqueueFillImage(cl_command_queue command_queue,
// TODO: EnqueueFillImage
return (cl_int)0;
return cl::EnqueueFillImage(command_queue, image, fill_color, origin, region,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueMigrateMemObjects(cl_command_queue command_queue,
@ -1487,7 +1538,8 @@ cl_int CL_API_CALL CL_EnqueueMigrateMemObjects(cl_command_queue command_queue,
// TODO: EnqueueMigrateMemObjects
return (cl_int)0;
return cl::EnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects, flags,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueMarkerWithWaitList(cl_command_queue command_queue,
@ -1504,7 +1556,8 @@ cl_int CL_API_CALL CL_EnqueueMarkerWithWaitList(cl_command_queue command_queue,
// TODO: EnqueueMarkerWithWaitList
return (cl_int)0;
return cl::EnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list, event_wait_list,
event);
}
cl_int CL_API_CALL CL_EnqueueBarrierWithWaitList(cl_command_queue command_queue,
@ -1521,7 +1574,8 @@ cl_int CL_API_CALL CL_EnqueueBarrierWithWaitList(cl_command_queue command_queue,
// TODO: EnqueueBarrierWithWaitList
return (cl_int)0;
return cl::EnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list, event_wait_list,
event);
}
void *CL_API_CALL CL_GetExtensionFunctionAddressForPlatform(cl_platform_id platform,
@ -1533,7 +1587,7 @@ void *CL_API_CALL CL_GetExtensionFunctionAddressForPlatform(cl_platform_id platf
// TODO: GetExtensionFunctionAddressForPlatform
return (void *)0;
return cl::GetExtensionFunctionAddressForPlatform(platform, func_name);
}
// CL 2.0
@ -1550,7 +1604,7 @@ CL_CreateCommandQueueWithProperties(cl_context context,
// TODO: CreateCommandQueueWithProperties
return (cl_command_queue)0;
return cl::CreateCommandQueueWithProperties(context, device, properties, errcode_ret);
}
cl_mem CL_API_CALL CL_CreatePipe(cl_context context,
@ -1570,7 +1624,8 @@ cl_mem CL_API_CALL CL_CreatePipe(cl_context context,
// TODO: CreatePipe
return (cl_mem)0;
return cl::CreatePipe(context, flags, pipe_packet_size, pipe_max_packets, properties,
errcode_ret);
}
cl_int CL_API_CALL CL_GetPipeInfo(cl_mem pipe,
@ -1588,7 +1643,7 @@ cl_int CL_API_CALL CL_GetPipeInfo(cl_mem pipe,
// TODO: GetPipeInfo
return (cl_int)0;
return cl::GetPipeInfo(pipe, param_name, param_value_size, param_value, param_value_size_ret);
}
void *CL_API_CALL CL_SVMAlloc(cl_context context,
@ -1601,7 +1656,7 @@ void *CL_API_CALL CL_SVMAlloc(cl_context context,
// TODO: SVMAlloc
return (void *)0;
return cl::SVMAlloc(context, flags, size, alignment);
}
void CL_API_CALL CL_SVMFree(cl_context context, void *svm_pointer)
@ -1610,6 +1665,8 @@ void CL_API_CALL CL_SVMFree(cl_context context, void *svm_pointer)
(uintptr_t)context, (uintptr_t)svm_pointer);
// TODO: SVMFree
cl::SVMFree(context, svm_pointer);
}
cl_sampler CL_API_CALL
@ -1624,7 +1681,7 @@ CL_CreateSamplerWithProperties(cl_context context,
// TODO: CreateSamplerWithProperties
return (cl_sampler)0;
return cl::CreateSamplerWithProperties(context, sampler_properties, errcode_ret);
}
cl_int CL_API_CALL CL_SetKernelArgSVMPointer(cl_kernel kernel,
@ -1637,7 +1694,7 @@ cl_int CL_API_CALL CL_SetKernelArgSVMPointer(cl_kernel kernel,
// TODO: SetKernelArgSVMPointer
return (cl_int)0;
return cl::SetKernelArgSVMPointer(kernel, arg_index, arg_value);
}
cl_int CL_API_CALL CL_SetKernelExecInfo(cl_kernel kernel,
@ -1652,7 +1709,7 @@ cl_int CL_API_CALL CL_SetKernelExecInfo(cl_kernel kernel,
// TODO: SetKernelExecInfo
return (cl_int)0;
return cl::SetKernelExecInfo(kernel, param_name, param_value_size, param_value);
}
cl_int CL_API_CALL CL_EnqueueSVMFree(cl_command_queue command_queue,
@ -1679,7 +1736,8 @@ cl_int CL_API_CALL CL_EnqueueSVMFree(cl_command_queue command_queue,
// TODO: EnqueueSVMFree
return (cl_int)0;
return cl::EnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func,
user_data, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueSVMMemcpy(cl_command_queue command_queue,
@ -1701,7 +1759,8 @@ cl_int CL_API_CALL CL_EnqueueSVMMemcpy(cl_command_queue command_queue,
// TODO: EnqueueSVMMemcpy
return (cl_int)0;
return cl::EnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueSVMMemFill(cl_command_queue command_queue,
@ -1723,7 +1782,8 @@ cl_int CL_API_CALL CL_EnqueueSVMMemFill(cl_command_queue command_queue,
// TODO: EnqueueSVMMemFill
return (cl_int)0;
return cl::EnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueSVMMap(cl_command_queue command_queue,
@ -1745,7 +1805,8 @@ cl_int CL_API_CALL CL_EnqueueSVMMap(cl_command_queue command_queue,
// TODO: EnqueueSVMMap
return (cl_int)0;
return cl::EnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size,
num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL CL_EnqueueSVMUnmap(cl_command_queue command_queue,
@ -1763,7 +1824,8 @@ cl_int CL_API_CALL CL_EnqueueSVMUnmap(cl_command_queue command_queue,
// TODO: EnqueueSVMUnmap
return (cl_int)0;
return cl::EnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list,
event);
}
// CL 2.1
@ -1778,7 +1840,7 @@ cl_int CL_API_CALL CL_SetDefaultDeviceCommandQueue(cl_context context,
// TODO: SetDefaultDeviceCommandQueue
return (cl_int)0;
return cl::SetDefaultDeviceCommandQueue(context, device, command_queue);
}
cl_int CL_API_CALL CL_GetDeviceAndHostTimer(cl_device_id device,
@ -1792,7 +1854,7 @@ cl_int CL_API_CALL CL_GetDeviceAndHostTimer(cl_device_id device,
// TODO: GetDeviceAndHostTimer
return (cl_int)0;
return cl::GetDeviceAndHostTimer(device, device_timestamp, host_timestamp);
}
cl_int CL_API_CALL CL_GetHostTimer(cl_device_id device, cl_ulong *host_timestamp)
@ -1802,7 +1864,7 @@ cl_int CL_API_CALL CL_GetHostTimer(cl_device_id device, cl_ulong *host_timestamp
// TODO: GetHostTimer
return (cl_int)0;
return cl::GetHostTimer(device, host_timestamp);
}
cl_program CL_API_CALL CL_CreateProgramWithIL(cl_context context,
@ -1817,7 +1879,7 @@ cl_program CL_API_CALL CL_CreateProgramWithIL(cl_context context,
// TODO: CreateProgramWithIL
return (cl_program)0;
return cl::CreateProgramWithIL(context, il, length, errcode_ret);
}
cl_kernel CL_API_CALL CL_CloneKernel(cl_kernel source_kernel, cl_int *errcode_ret)
@ -1827,7 +1889,7 @@ cl_kernel CL_API_CALL CL_CloneKernel(cl_kernel source_kernel, cl_int *errcode_re
// TODO: CloneKernel
return (cl_kernel)0;
return cl::CloneKernel(source_kernel, errcode_ret);
}
cl_int CL_API_CALL CL_GetKernelSubGroupInfo(cl_kernel kernel,
@ -1850,7 +1912,8 @@ cl_int CL_API_CALL CL_GetKernelSubGroupInfo(cl_kernel kernel,
// TODO: GetKernelSubGroupInfo
return (cl_int)0;
return cl::GetKernelSubGroupInfo(kernel, device, param_name, input_value_size, input_value,
param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
@ -1872,7 +1935,8 @@ cl_int CL_API_CALL CL_EnqueueSVMMigrateMem(cl_command_queue command_queue,
// TODO: EnqueueSVMMigrateMem
return (cl_int)0;
return cl::EnqueueSVMMigrateMem(command_queue, num_svm_pointers, svm_pointers, sizes, flags,
num_events_in_wait_list, event_wait_list, event);
}
// CL 2.2
@ -1888,7 +1952,7 @@ cl_int CL_API_CALL CL_SetProgramReleaseCallback(cl_program program,
// TODO: SetProgramReleaseCallback
return (cl_int)0;
return cl::SetProgramReleaseCallback(program, pfn_notify, user_data);
}
cl_int CL_API_CALL CL_SetProgramSpecializationConstant(cl_program program,
@ -1903,7 +1967,7 @@ cl_int CL_API_CALL CL_SetProgramSpecializationConstant(cl_program program,
// TODO: SetProgramSpecializationConstant
return (cl_int)0;
return cl::SetProgramSpecializationConstant(program, spec_id, spec_size, spec_value);
}
// CL 3.0
@ -1919,7 +1983,7 @@ cl_int CL_API_CALL CL_SetContextDestructorCallback(cl_context context,
// TODO: SetContextDestructorCallback
return (cl_int)0;
return cl::SetContextDestructorCallback(context, pfn_notify, user_data);
}
cl_mem CL_API_CALL CL_CreateBufferWithProperties(cl_context context,
@ -1938,7 +2002,7 @@ cl_mem CL_API_CALL CL_CreateBufferWithProperties(cl_context context,
// TODO: CreateBufferWithProperties
return (cl_mem)0;
return cl::CreateBufferWithProperties(context, properties, flags, size, host_ptr, errcode_ret);
}
cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
@ -1958,7 +2022,8 @@ cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
// TODO: CreateImageWithProperties
return (cl_mem)0;
return cl::CreateImageWithProperties(context, properties, flags, image_format, image_desc,
host_ptr, errcode_ret);
}
} // extern "C"

Просмотреть файл

@ -8,8 +8,8 @@
// entry_points_cl_autogen.h:
// Defines the CL entry points.
#ifndef LIBOPENCL_ENTRY_POINTS_CL_AUTOGEN_H_
#define LIBOPENCL_ENTRY_POINTS_CL_AUTOGEN_H_
#ifndef LIBGLESV2_ENTRY_POINTS_CL_AUTOGEN_H_
#define LIBGLESV2_ENTRY_POINTS_CL_AUTOGEN_H_
#include "export.h"
@ -618,4 +618,4 @@ ANGLE_EXPORT cl_mem CL_API_CALL CL_CreateImageWithProperties(cl_context context,
cl_int *errcode_ret);
} // extern "C"
#endif // LIBOPENCL_ENTRY_POINTS_CL_AUTOGEN_H_
#endif // LIBGLESV2_ENTRY_POINTS_CL_AUTOGEN_H_

Просмотреть файл

@ -6,8 +6,8 @@
// entry_points_cl_utils.h:
// These helpers are used in CL entry point routines.
#ifndef LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
#define LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
#ifndef LIBGLESV2_ENTRY_POINTS_CL_UTILS_H_
#define LIBGLESV2_ENTRY_POINTS_CL_UTILS_H_
#include <cinttypes>
#include <cstdio>
@ -20,4 +20,4 @@
# define CL_EVENT(entryPoint, ...) (void(0))
#endif
#endif // LIBOPENCL_ENTRY_POINTS_CL_UTILS_H_
#endif // LIBGLESV2_ENTRY_POINTS_CL_UTILS_H_

Просмотреть файл

@ -32,15 +32,22 @@ angle_source_set("cl_includes") {
angle_shared_library("OpenCL") {
defines = [ "LIBCL_IMPLEMENTATION" ]
sources = [
"cl_loader.h",
"cl_loader_autogen.cpp",
"entry_points_cl_autogen.cpp",
"entry_points_cl_autogen.h",
"entry_points_cl_utils.h",
"libOpenCL_autogen.cpp",
]
deps = [ ":cl_includes" ]
configs += [
"$angle_root:debug_annotations_config",
"$angle_root:library_name_config",
]
deps = [
":cl_includes",
"$angle_root:angle_common",
]
}
group("angle_cl") {

Просмотреть файл

@ -9,7 +9,7 @@
#ifndef LIBCL_CL_LOADER_H_
#define LIBCL_CL_LOADER_H_
#include <export.h>
#include "export.h"
#ifndef CL_API_ENTRY
# define CL_API_ENTRY ANGLE_EXPORT

Просмотреть файл

@ -10,128 +10,226 @@
#include "cl_loader.h"
// TODO(jplate): remove include after entry points moved to GLESV2 lib http://anglebug.com/5759
#include "entry_points_cl_autogen.h"
cl_icd_dispatch cl_loader;
namespace angle
{
void LoadCL(LoadProc loadProc)
{
cl_loader.clGetPlatformIDs = CL_GetPlatformIDs;
cl_loader.clGetPlatformInfo = CL_GetPlatformInfo;
cl_loader.clGetDeviceIDs = CL_GetDeviceIDs;
cl_loader.clGetDeviceInfo = CL_GetDeviceInfo;
cl_loader.clCreateContext = CL_CreateContext;
cl_loader.clCreateContextFromType = CL_CreateContextFromType;
cl_loader.clRetainContext = CL_RetainContext;
cl_loader.clReleaseContext = CL_ReleaseContext;
cl_loader.clGetContextInfo = CL_GetContextInfo;
cl_loader.clRetainCommandQueue = CL_RetainCommandQueue;
cl_loader.clReleaseCommandQueue = CL_ReleaseCommandQueue;
cl_loader.clGetCommandQueueInfo = CL_GetCommandQueueInfo;
cl_loader.clCreateBuffer = CL_CreateBuffer;
cl_loader.clRetainMemObject = CL_RetainMemObject;
cl_loader.clReleaseMemObject = CL_ReleaseMemObject;
cl_loader.clGetSupportedImageFormats = CL_GetSupportedImageFormats;
cl_loader.clGetMemObjectInfo = CL_GetMemObjectInfo;
cl_loader.clGetImageInfo = CL_GetImageInfo;
cl_loader.clRetainSampler = CL_RetainSampler;
cl_loader.clReleaseSampler = CL_ReleaseSampler;
cl_loader.clGetSamplerInfo = CL_GetSamplerInfo;
cl_loader.clCreateProgramWithSource = CL_CreateProgramWithSource;
cl_loader.clCreateProgramWithBinary = CL_CreateProgramWithBinary;
cl_loader.clRetainProgram = CL_RetainProgram;
cl_loader.clReleaseProgram = CL_ReleaseProgram;
cl_loader.clBuildProgram = CL_BuildProgram;
cl_loader.clGetProgramInfo = CL_GetProgramInfo;
cl_loader.clGetProgramBuildInfo = CL_GetProgramBuildInfo;
cl_loader.clCreateKernel = CL_CreateKernel;
cl_loader.clCreateKernelsInProgram = CL_CreateKernelsInProgram;
cl_loader.clRetainKernel = CL_RetainKernel;
cl_loader.clReleaseKernel = CL_ReleaseKernel;
cl_loader.clSetKernelArg = CL_SetKernelArg;
cl_loader.clGetKernelInfo = CL_GetKernelInfo;
cl_loader.clGetKernelWorkGroupInfo = CL_GetKernelWorkGroupInfo;
cl_loader.clWaitForEvents = CL_WaitForEvents;
cl_loader.clGetEventInfo = CL_GetEventInfo;
cl_loader.clRetainEvent = CL_RetainEvent;
cl_loader.clReleaseEvent = CL_ReleaseEvent;
cl_loader.clGetEventProfilingInfo = CL_GetEventProfilingInfo;
cl_loader.clFlush = CL_Flush;
cl_loader.clFinish = CL_Finish;
cl_loader.clEnqueueReadBuffer = CL_EnqueueReadBuffer;
cl_loader.clEnqueueWriteBuffer = CL_EnqueueWriteBuffer;
cl_loader.clEnqueueCopyBuffer = CL_EnqueueCopyBuffer;
cl_loader.clEnqueueReadImage = CL_EnqueueReadImage;
cl_loader.clEnqueueWriteImage = CL_EnqueueWriteImage;
cl_loader.clEnqueueCopyImage = CL_EnqueueCopyImage;
cl_loader.clEnqueueCopyImageToBuffer = CL_EnqueueCopyImageToBuffer;
cl_loader.clEnqueueCopyBufferToImage = CL_EnqueueCopyBufferToImage;
cl_loader.clEnqueueMapBuffer = CL_EnqueueMapBuffer;
cl_loader.clEnqueueMapImage = CL_EnqueueMapImage;
cl_loader.clEnqueueUnmapMemObject = CL_EnqueueUnmapMemObject;
cl_loader.clEnqueueNDRangeKernel = CL_EnqueueNDRangeKernel;
cl_loader.clEnqueueNativeKernel = CL_EnqueueNativeKernel;
cl_loader.clSetCommandQueueProperty = CL_SetCommandQueueProperty;
cl_loader.clCreateImage2D = CL_CreateImage2D;
cl_loader.clCreateImage3D = CL_CreateImage3D;
cl_loader.clEnqueueMarker = CL_EnqueueMarker;
cl_loader.clEnqueueWaitForEvents = CL_EnqueueWaitForEvents;
cl_loader.clEnqueueBarrier = CL_EnqueueBarrier;
cl_loader.clUnloadCompiler = CL_UnloadCompiler;
cl_loader.clGetExtensionFunctionAddress = CL_GetExtensionFunctionAddress;
cl_loader.clCreateCommandQueue = CL_CreateCommandQueue;
cl_loader.clCreateSampler = CL_CreateSampler;
cl_loader.clEnqueueTask = CL_EnqueueTask;
cl_loader.clCreateSubBuffer = CL_CreateSubBuffer;
cl_loader.clSetMemObjectDestructorCallback = CL_SetMemObjectDestructorCallback;
cl_loader.clCreateUserEvent = CL_CreateUserEvent;
cl_loader.clSetUserEventStatus = CL_SetUserEventStatus;
cl_loader.clSetEventCallback = CL_SetEventCallback;
cl_loader.clEnqueueReadBufferRect = CL_EnqueueReadBufferRect;
cl_loader.clEnqueueWriteBufferRect = CL_EnqueueWriteBufferRect;
cl_loader.clEnqueueCopyBufferRect = CL_EnqueueCopyBufferRect;
cl_loader.clCreateSubDevices = CL_CreateSubDevices;
cl_loader.clRetainDevice = CL_RetainDevice;
cl_loader.clReleaseDevice = CL_ReleaseDevice;
cl_loader.clCreateImage = CL_CreateImage;
cl_loader.clCreateProgramWithBuiltInKernels = CL_CreateProgramWithBuiltInKernels;
cl_loader.clCompileProgram = CL_CompileProgram;
cl_loader.clLinkProgram = CL_LinkProgram;
cl_loader.clUnloadPlatformCompiler = CL_UnloadPlatformCompiler;
cl_loader.clGetKernelArgInfo = CL_GetKernelArgInfo;
cl_loader.clEnqueueFillBuffer = CL_EnqueueFillBuffer;
cl_loader.clEnqueueFillImage = CL_EnqueueFillImage;
cl_loader.clEnqueueMigrateMemObjects = CL_EnqueueMigrateMemObjects;
cl_loader.clEnqueueMarkerWithWaitList = CL_EnqueueMarkerWithWaitList;
cl_loader.clEnqueueBarrierWithWaitList = CL_EnqueueBarrierWithWaitList;
cl_loader.clGetExtensionFunctionAddressForPlatform = CL_GetExtensionFunctionAddressForPlatform;
cl_loader.clCreateCommandQueueWithProperties = CL_CreateCommandQueueWithProperties;
cl_loader.clCreatePipe = CL_CreatePipe;
cl_loader.clGetPipeInfo = CL_GetPipeInfo;
cl_loader.clSVMAlloc = CL_SVMAlloc;
cl_loader.clSVMFree = CL_SVMFree;
cl_loader.clCreateSamplerWithProperties = CL_CreateSamplerWithProperties;
cl_loader.clSetKernelArgSVMPointer = CL_SetKernelArgSVMPointer;
cl_loader.clSetKernelExecInfo = CL_SetKernelExecInfo;
cl_loader.clEnqueueSVMFree = CL_EnqueueSVMFree;
cl_loader.clEnqueueSVMMemcpy = CL_EnqueueSVMMemcpy;
cl_loader.clEnqueueSVMMemFill = CL_EnqueueSVMMemFill;
cl_loader.clEnqueueSVMMap = CL_EnqueueSVMMap;
cl_loader.clEnqueueSVMUnmap = CL_EnqueueSVMUnmap;
cl_loader.clSetDefaultDeviceCommandQueue = CL_SetDefaultDeviceCommandQueue;
cl_loader.clGetDeviceAndHostTimer = CL_GetDeviceAndHostTimer;
cl_loader.clGetHostTimer = CL_GetHostTimer;
cl_loader.clCreateProgramWithIL = CL_CreateProgramWithIL;
cl_loader.clCloneKernel = CL_CloneKernel;
cl_loader.clGetKernelSubGroupInfo = CL_GetKernelSubGroupInfo;
cl_loader.clEnqueueSVMMigrateMem = CL_EnqueueSVMMigrateMem;
cl_loader.clSetProgramSpecializationConstant = CL_SetProgramSpecializationConstant;
cl_loader.clSetProgramReleaseCallback = CL_SetProgramReleaseCallback;
cl_loader.clSetContextDestructorCallback = CL_SetContextDestructorCallback;
cl_loader.clCreateBufferWithProperties = CL_CreateBufferWithProperties;
cl_loader.clCreateImageWithProperties = CL_CreateImageWithProperties;
cl_loader.clGetPlatformIDs =
reinterpret_cast<cl_api_clGetPlatformIDs>(loadProc("CL_GetPlatformIDs"));
cl_loader.clGetPlatformInfo =
reinterpret_cast<cl_api_clGetPlatformInfo>(loadProc("CL_GetPlatformInfo"));
cl_loader.clGetDeviceIDs = reinterpret_cast<cl_api_clGetDeviceIDs>(loadProc("CL_GetDeviceIDs"));
cl_loader.clGetDeviceInfo =
reinterpret_cast<cl_api_clGetDeviceInfo>(loadProc("CL_GetDeviceInfo"));
cl_loader.clCreateContext =
reinterpret_cast<cl_api_clCreateContext>(loadProc("CL_CreateContext"));
cl_loader.clCreateContextFromType =
reinterpret_cast<cl_api_clCreateContextFromType>(loadProc("CL_CreateContextFromType"));
cl_loader.clRetainContext =
reinterpret_cast<cl_api_clRetainContext>(loadProc("CL_RetainContext"));
cl_loader.clReleaseContext =
reinterpret_cast<cl_api_clReleaseContext>(loadProc("CL_ReleaseContext"));
cl_loader.clGetContextInfo =
reinterpret_cast<cl_api_clGetContextInfo>(loadProc("CL_GetContextInfo"));
cl_loader.clRetainCommandQueue =
reinterpret_cast<cl_api_clRetainCommandQueue>(loadProc("CL_RetainCommandQueue"));
cl_loader.clReleaseCommandQueue =
reinterpret_cast<cl_api_clReleaseCommandQueue>(loadProc("CL_ReleaseCommandQueue"));
cl_loader.clGetCommandQueueInfo =
reinterpret_cast<cl_api_clGetCommandQueueInfo>(loadProc("CL_GetCommandQueueInfo"));
cl_loader.clCreateBuffer = reinterpret_cast<cl_api_clCreateBuffer>(loadProc("CL_CreateBuffer"));
cl_loader.clRetainMemObject =
reinterpret_cast<cl_api_clRetainMemObject>(loadProc("CL_RetainMemObject"));
cl_loader.clReleaseMemObject =
reinterpret_cast<cl_api_clReleaseMemObject>(loadProc("CL_ReleaseMemObject"));
cl_loader.clGetSupportedImageFormats = reinterpret_cast<cl_api_clGetSupportedImageFormats>(
loadProc("CL_GetSupportedImageFormats"));
cl_loader.clGetMemObjectInfo =
reinterpret_cast<cl_api_clGetMemObjectInfo>(loadProc("CL_GetMemObjectInfo"));
cl_loader.clGetImageInfo = reinterpret_cast<cl_api_clGetImageInfo>(loadProc("CL_GetImageInfo"));
cl_loader.clRetainSampler =
reinterpret_cast<cl_api_clRetainSampler>(loadProc("CL_RetainSampler"));
cl_loader.clReleaseSampler =
reinterpret_cast<cl_api_clReleaseSampler>(loadProc("CL_ReleaseSampler"));
cl_loader.clGetSamplerInfo =
reinterpret_cast<cl_api_clGetSamplerInfo>(loadProc("CL_GetSamplerInfo"));
cl_loader.clCreateProgramWithSource =
reinterpret_cast<cl_api_clCreateProgramWithSource>(loadProc("CL_CreateProgramWithSource"));
cl_loader.clCreateProgramWithBinary =
reinterpret_cast<cl_api_clCreateProgramWithBinary>(loadProc("CL_CreateProgramWithBinary"));
cl_loader.clRetainProgram =
reinterpret_cast<cl_api_clRetainProgram>(loadProc("CL_RetainProgram"));
cl_loader.clReleaseProgram =
reinterpret_cast<cl_api_clReleaseProgram>(loadProc("CL_ReleaseProgram"));
cl_loader.clBuildProgram = reinterpret_cast<cl_api_clBuildProgram>(loadProc("CL_BuildProgram"));
cl_loader.clGetProgramInfo =
reinterpret_cast<cl_api_clGetProgramInfo>(loadProc("CL_GetProgramInfo"));
cl_loader.clGetProgramBuildInfo =
reinterpret_cast<cl_api_clGetProgramBuildInfo>(loadProc("CL_GetProgramBuildInfo"));
cl_loader.clCreateKernel = reinterpret_cast<cl_api_clCreateKernel>(loadProc("CL_CreateKernel"));
cl_loader.clCreateKernelsInProgram =
reinterpret_cast<cl_api_clCreateKernelsInProgram>(loadProc("CL_CreateKernelsInProgram"));
cl_loader.clRetainKernel = reinterpret_cast<cl_api_clRetainKernel>(loadProc("CL_RetainKernel"));
cl_loader.clReleaseKernel =
reinterpret_cast<cl_api_clReleaseKernel>(loadProc("CL_ReleaseKernel"));
cl_loader.clSetKernelArg = reinterpret_cast<cl_api_clSetKernelArg>(loadProc("CL_SetKernelArg"));
cl_loader.clGetKernelInfo =
reinterpret_cast<cl_api_clGetKernelInfo>(loadProc("CL_GetKernelInfo"));
cl_loader.clGetKernelWorkGroupInfo =
reinterpret_cast<cl_api_clGetKernelWorkGroupInfo>(loadProc("CL_GetKernelWorkGroupInfo"));
cl_loader.clWaitForEvents =
reinterpret_cast<cl_api_clWaitForEvents>(loadProc("CL_WaitForEvents"));
cl_loader.clGetEventInfo = reinterpret_cast<cl_api_clGetEventInfo>(loadProc("CL_GetEventInfo"));
cl_loader.clRetainEvent = reinterpret_cast<cl_api_clRetainEvent>(loadProc("CL_RetainEvent"));
cl_loader.clReleaseEvent = reinterpret_cast<cl_api_clReleaseEvent>(loadProc("CL_ReleaseEvent"));
cl_loader.clGetEventProfilingInfo =
reinterpret_cast<cl_api_clGetEventProfilingInfo>(loadProc("CL_GetEventProfilingInfo"));
cl_loader.clFlush = reinterpret_cast<cl_api_clFlush>(loadProc("CL_Flush"));
cl_loader.clFinish = reinterpret_cast<cl_api_clFinish>(loadProc("CL_Finish"));
cl_loader.clEnqueueReadBuffer =
reinterpret_cast<cl_api_clEnqueueReadBuffer>(loadProc("CL_EnqueueReadBuffer"));
cl_loader.clEnqueueWriteBuffer =
reinterpret_cast<cl_api_clEnqueueWriteBuffer>(loadProc("CL_EnqueueWriteBuffer"));
cl_loader.clEnqueueCopyBuffer =
reinterpret_cast<cl_api_clEnqueueCopyBuffer>(loadProc("CL_EnqueueCopyBuffer"));
cl_loader.clEnqueueReadImage =
reinterpret_cast<cl_api_clEnqueueReadImage>(loadProc("CL_EnqueueReadImage"));
cl_loader.clEnqueueWriteImage =
reinterpret_cast<cl_api_clEnqueueWriteImage>(loadProc("CL_EnqueueWriteImage"));
cl_loader.clEnqueueCopyImage =
reinterpret_cast<cl_api_clEnqueueCopyImage>(loadProc("CL_EnqueueCopyImage"));
cl_loader.clEnqueueCopyImageToBuffer = reinterpret_cast<cl_api_clEnqueueCopyImageToBuffer>(
loadProc("CL_EnqueueCopyImageToBuffer"));
cl_loader.clEnqueueCopyBufferToImage = reinterpret_cast<cl_api_clEnqueueCopyBufferToImage>(
loadProc("CL_EnqueueCopyBufferToImage"));
cl_loader.clEnqueueMapBuffer =
reinterpret_cast<cl_api_clEnqueueMapBuffer>(loadProc("CL_EnqueueMapBuffer"));
cl_loader.clEnqueueMapImage =
reinterpret_cast<cl_api_clEnqueueMapImage>(loadProc("CL_EnqueueMapImage"));
cl_loader.clEnqueueUnmapMemObject =
reinterpret_cast<cl_api_clEnqueueUnmapMemObject>(loadProc("CL_EnqueueUnmapMemObject"));
cl_loader.clEnqueueNDRangeKernel =
reinterpret_cast<cl_api_clEnqueueNDRangeKernel>(loadProc("CL_EnqueueNDRangeKernel"));
cl_loader.clEnqueueNativeKernel =
reinterpret_cast<cl_api_clEnqueueNativeKernel>(loadProc("CL_EnqueueNativeKernel"));
cl_loader.clSetCommandQueueProperty =
reinterpret_cast<cl_api_clSetCommandQueueProperty>(loadProc("CL_SetCommandQueueProperty"));
cl_loader.clCreateImage2D =
reinterpret_cast<cl_api_clCreateImage2D>(loadProc("CL_CreateImage2D"));
cl_loader.clCreateImage3D =
reinterpret_cast<cl_api_clCreateImage3D>(loadProc("CL_CreateImage3D"));
cl_loader.clEnqueueMarker =
reinterpret_cast<cl_api_clEnqueueMarker>(loadProc("CL_EnqueueMarker"));
cl_loader.clEnqueueWaitForEvents =
reinterpret_cast<cl_api_clEnqueueWaitForEvents>(loadProc("CL_EnqueueWaitForEvents"));
cl_loader.clEnqueueBarrier =
reinterpret_cast<cl_api_clEnqueueBarrier>(loadProc("CL_EnqueueBarrier"));
cl_loader.clUnloadCompiler =
reinterpret_cast<cl_api_clUnloadCompiler>(loadProc("CL_UnloadCompiler"));
cl_loader.clGetExtensionFunctionAddress =
reinterpret_cast<cl_api_clGetExtensionFunctionAddress>(
loadProc("CL_GetExtensionFunctionAddress"));
cl_loader.clCreateCommandQueue =
reinterpret_cast<cl_api_clCreateCommandQueue>(loadProc("CL_CreateCommandQueue"));
cl_loader.clCreateSampler =
reinterpret_cast<cl_api_clCreateSampler>(loadProc("CL_CreateSampler"));
cl_loader.clEnqueueTask = reinterpret_cast<cl_api_clEnqueueTask>(loadProc("CL_EnqueueTask"));
cl_loader.clCreateSubBuffer =
reinterpret_cast<cl_api_clCreateSubBuffer>(loadProc("CL_CreateSubBuffer"));
cl_loader.clSetMemObjectDestructorCallback =
reinterpret_cast<cl_api_clSetMemObjectDestructorCallback>(
loadProc("CL_SetMemObjectDestructorCallback"));
cl_loader.clCreateUserEvent =
reinterpret_cast<cl_api_clCreateUserEvent>(loadProc("CL_CreateUserEvent"));
cl_loader.clSetUserEventStatus =
reinterpret_cast<cl_api_clSetUserEventStatus>(loadProc("CL_SetUserEventStatus"));
cl_loader.clSetEventCallback =
reinterpret_cast<cl_api_clSetEventCallback>(loadProc("CL_SetEventCallback"));
cl_loader.clEnqueueReadBufferRect =
reinterpret_cast<cl_api_clEnqueueReadBufferRect>(loadProc("CL_EnqueueReadBufferRect"));
cl_loader.clEnqueueWriteBufferRect =
reinterpret_cast<cl_api_clEnqueueWriteBufferRect>(loadProc("CL_EnqueueWriteBufferRect"));
cl_loader.clEnqueueCopyBufferRect =
reinterpret_cast<cl_api_clEnqueueCopyBufferRect>(loadProc("CL_EnqueueCopyBufferRect"));
cl_loader.clCreateSubDevices =
reinterpret_cast<cl_api_clCreateSubDevices>(loadProc("CL_CreateSubDevices"));
cl_loader.clRetainDevice = reinterpret_cast<cl_api_clRetainDevice>(loadProc("CL_RetainDevice"));
cl_loader.clReleaseDevice =
reinterpret_cast<cl_api_clReleaseDevice>(loadProc("CL_ReleaseDevice"));
cl_loader.clCreateImage = reinterpret_cast<cl_api_clCreateImage>(loadProc("CL_CreateImage"));
cl_loader.clCreateProgramWithBuiltInKernels =
reinterpret_cast<cl_api_clCreateProgramWithBuiltInKernels>(
loadProc("CL_CreateProgramWithBuiltInKernels"));
cl_loader.clCompileProgram =
reinterpret_cast<cl_api_clCompileProgram>(loadProc("CL_CompileProgram"));
cl_loader.clLinkProgram = reinterpret_cast<cl_api_clLinkProgram>(loadProc("CL_LinkProgram"));
cl_loader.clUnloadPlatformCompiler =
reinterpret_cast<cl_api_clUnloadPlatformCompiler>(loadProc("CL_UnloadPlatformCompiler"));
cl_loader.clGetKernelArgInfo =
reinterpret_cast<cl_api_clGetKernelArgInfo>(loadProc("CL_GetKernelArgInfo"));
cl_loader.clEnqueueFillBuffer =
reinterpret_cast<cl_api_clEnqueueFillBuffer>(loadProc("CL_EnqueueFillBuffer"));
cl_loader.clEnqueueFillImage =
reinterpret_cast<cl_api_clEnqueueFillImage>(loadProc("CL_EnqueueFillImage"));
cl_loader.clEnqueueMigrateMemObjects = reinterpret_cast<cl_api_clEnqueueMigrateMemObjects>(
loadProc("CL_EnqueueMigrateMemObjects"));
cl_loader.clEnqueueMarkerWithWaitList = reinterpret_cast<cl_api_clEnqueueMarkerWithWaitList>(
loadProc("CL_EnqueueMarkerWithWaitList"));
cl_loader.clEnqueueBarrierWithWaitList = reinterpret_cast<cl_api_clEnqueueBarrierWithWaitList>(
loadProc("CL_EnqueueBarrierWithWaitList"));
cl_loader.clGetExtensionFunctionAddressForPlatform =
reinterpret_cast<cl_api_clGetExtensionFunctionAddressForPlatform>(
loadProc("CL_GetExtensionFunctionAddressForPlatform"));
cl_loader.clCreateCommandQueueWithProperties =
reinterpret_cast<cl_api_clCreateCommandQueueWithProperties>(
loadProc("CL_CreateCommandQueueWithProperties"));
cl_loader.clCreatePipe = reinterpret_cast<cl_api_clCreatePipe>(loadProc("CL_CreatePipe"));
cl_loader.clGetPipeInfo = reinterpret_cast<cl_api_clGetPipeInfo>(loadProc("CL_GetPipeInfo"));
cl_loader.clSVMAlloc = reinterpret_cast<cl_api_clSVMAlloc>(loadProc("CL_SVMAlloc"));
cl_loader.clSVMFree = reinterpret_cast<cl_api_clSVMFree>(loadProc("CL_SVMFree"));
cl_loader.clCreateSamplerWithProperties =
reinterpret_cast<cl_api_clCreateSamplerWithProperties>(
loadProc("CL_CreateSamplerWithProperties"));
cl_loader.clSetKernelArgSVMPointer =
reinterpret_cast<cl_api_clSetKernelArgSVMPointer>(loadProc("CL_SetKernelArgSVMPointer"));
cl_loader.clSetKernelExecInfo =
reinterpret_cast<cl_api_clSetKernelExecInfo>(loadProc("CL_SetKernelExecInfo"));
cl_loader.clEnqueueSVMFree =
reinterpret_cast<cl_api_clEnqueueSVMFree>(loadProc("CL_EnqueueSVMFree"));
cl_loader.clEnqueueSVMMemcpy =
reinterpret_cast<cl_api_clEnqueueSVMMemcpy>(loadProc("CL_EnqueueSVMMemcpy"));
cl_loader.clEnqueueSVMMemFill =
reinterpret_cast<cl_api_clEnqueueSVMMemFill>(loadProc("CL_EnqueueSVMMemFill"));
cl_loader.clEnqueueSVMMap =
reinterpret_cast<cl_api_clEnqueueSVMMap>(loadProc("CL_EnqueueSVMMap"));
cl_loader.clEnqueueSVMUnmap =
reinterpret_cast<cl_api_clEnqueueSVMUnmap>(loadProc("CL_EnqueueSVMUnmap"));
cl_loader.clSetDefaultDeviceCommandQueue =
reinterpret_cast<cl_api_clSetDefaultDeviceCommandQueue>(
loadProc("CL_SetDefaultDeviceCommandQueue"));
cl_loader.clGetDeviceAndHostTimer =
reinterpret_cast<cl_api_clGetDeviceAndHostTimer>(loadProc("CL_GetDeviceAndHostTimer"));
cl_loader.clGetHostTimer = reinterpret_cast<cl_api_clGetHostTimer>(loadProc("CL_GetHostTimer"));
cl_loader.clCreateProgramWithIL =
reinterpret_cast<cl_api_clCreateProgramWithIL>(loadProc("CL_CreateProgramWithIL"));
cl_loader.clCloneKernel = reinterpret_cast<cl_api_clCloneKernel>(loadProc("CL_CloneKernel"));
cl_loader.clGetKernelSubGroupInfo =
reinterpret_cast<cl_api_clGetKernelSubGroupInfo>(loadProc("CL_GetKernelSubGroupInfo"));
cl_loader.clEnqueueSVMMigrateMem =
reinterpret_cast<cl_api_clEnqueueSVMMigrateMem>(loadProc("CL_EnqueueSVMMigrateMem"));
cl_loader.clSetProgramSpecializationConstant =
reinterpret_cast<cl_api_clSetProgramSpecializationConstant>(
loadProc("CL_SetProgramSpecializationConstant"));
cl_loader.clSetProgramReleaseCallback = reinterpret_cast<cl_api_clSetProgramReleaseCallback>(
loadProc("CL_SetProgramReleaseCallback"));
cl_loader.clSetContextDestructorCallback =
reinterpret_cast<cl_api_clSetContextDestructorCallback>(
loadProc("CL_SetContextDestructorCallback"));
cl_loader.clCreateBufferWithProperties = reinterpret_cast<cl_api_clCreateBufferWithProperties>(
loadProc("CL_CreateBufferWithProperties"));
cl_loader.clCreateImageWithProperties = reinterpret_cast<cl_api_clCreateImageWithProperties>(
loadProc("CL_CreateImageWithProperties"));
}
} // namespace angle

Просмотреть файл

@ -7,19 +7,18 @@
//
// libOpenCL_autogen.cpp: Implements the exported CL functions.
//#include "anglebase/no_destructor.h"
//#include "common/system_utils.h"
#include "cl_loader.h"
#include "anglebase/no_destructor.h"
#include "common/system_utils.h"
#include <iostream>
//#include <memory>
#include "cl_loader.h"
#include <memory>
namespace
{
bool gLoaded = false;
/* TODO(jplate): uncomment after entry points moved to GLESV2 lib http://anglebug.com/5759
std::unique_ptr<angle::Library> &EntryPointsLib()
{
static angle::base::NoDestructor<std::unique_ptr<angle::Library>> sEntryPointsLib;
@ -30,7 +29,6 @@ angle::GenericProc CL_API_CALL GlobalLoad(const char *symbol)
{
return reinterpret_cast<angle::GenericProc>(EntryPointsLib()->getSymbol(symbol));
}
*/
void EnsureCLLoaded()
{
@ -39,10 +37,9 @@ void EnsureCLLoaded()
return;
}
// EntryPointsLib().reset(
// angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
// angle::LoadCL(GlobalLoad);
angle::LoadCL(nullptr);
EntryPointsLib().reset(
angle::OpenSharedLibrary(ANGLE_GLESV2_LIBRARY_NAME, angle::SearchType::ApplicationDir));
angle::LoadCL(GlobalLoad);
if (!cl_loader.clGetDeviceIDs)
{
std::cerr << "Error loading CL entry points." << std::endl;