Path: blob/main_old/src/libOpenCL/libOpenCL_autogen.cpp
1693 views
// GENERATED FILE - DO NOT EDIT.1// Generated by generate_entry_points.py using data from cl.xml.2//3// Copyright 2020 The ANGLE Project Authors. All rights reserved.4// Use of this source code is governed by a BSD-style license that can be5// found in the LICENSE file.6//7// libOpenCL_autogen.cpp: Implements the exported CL functions.89#include "libOpenCL/dispatch.h"1011extern "C" {1213// CL 1.014cl_int CL_API_CALL clGetPlatformIDs(cl_uint num_entries,15cl_platform_id *platforms,16cl_uint *num_platforms)17{18return cl::GetDispatch().clGetPlatformIDs(num_entries, platforms, num_platforms);19}2021cl_int CL_API_CALL clGetPlatformInfo(cl_platform_id platform,22cl_platform_info param_name,23size_t param_value_size,24void *param_value,25size_t *param_value_size_ret)26{27return cl::GetDispatch().clGetPlatformInfo(platform, param_name, param_value_size, param_value,28param_value_size_ret);29}3031cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform,32cl_device_type device_type,33cl_uint num_entries,34cl_device_id *devices,35cl_uint *num_devices)36{37return cl::GetDispatch().clGetDeviceIDs(platform, device_type, num_entries, devices,38num_devices);39}4041cl_int CL_API_CALL clGetDeviceInfo(cl_device_id device,42cl_device_info param_name,43size_t param_value_size,44void *param_value,45size_t *param_value_size_ret)46{47return cl::GetDispatch().clGetDeviceInfo(device, param_name, param_value_size, param_value,48param_value_size_ret);49}5051cl_context CL_API_CALL clCreateContext(const cl_context_properties *properties,52cl_uint num_devices,53const cl_device_id *devices,54void(CL_CALLBACK *pfn_notify)(const char *errinfo,55const void *private_info,56size_t cb,57void *user_data),58void *user_data,59cl_int *errcode_ret)60{61return cl::GetDispatch().clCreateContext(properties, num_devices, devices, pfn_notify,62user_data, errcode_ret);63}6465cl_context CL_API_CALL66clCreateContextFromType(const cl_context_properties *properties,67cl_device_type device_type,68void(CL_CALLBACK *pfn_notify)(const char *errinfo,69const void *private_info,70size_t cb,71void *user_data),72void *user_data,73cl_int *errcode_ret)74{75return cl::GetDispatch().clCreateContextFromType(properties, device_type, pfn_notify, user_data,76errcode_ret);77}7879cl_int CL_API_CALL clRetainContext(cl_context context)80{81return cl::GetDispatch().clRetainContext(context);82}8384cl_int CL_API_CALL clReleaseContext(cl_context context)85{86return cl::GetDispatch().clReleaseContext(context);87}8889cl_int CL_API_CALL clGetContextInfo(cl_context context,90cl_context_info param_name,91size_t param_value_size,92void *param_value,93size_t *param_value_size_ret)94{95return cl::GetDispatch().clGetContextInfo(context, param_name, param_value_size, param_value,96param_value_size_ret);97}9899cl_int CL_API_CALL clRetainCommandQueue(cl_command_queue command_queue)100{101return cl::GetDispatch().clRetainCommandQueue(command_queue);102}103104cl_int CL_API_CALL clReleaseCommandQueue(cl_command_queue command_queue)105{106return cl::GetDispatch().clReleaseCommandQueue(command_queue);107}108109cl_int CL_API_CALL clGetCommandQueueInfo(cl_command_queue command_queue,110cl_command_queue_info param_name,111size_t param_value_size,112void *param_value,113size_t *param_value_size_ret)114{115return cl::GetDispatch().clGetCommandQueueInfo(command_queue, param_name, param_value_size,116param_value, param_value_size_ret);117}118119cl_mem CL_API_CALL clCreateBuffer(cl_context context,120cl_mem_flags flags,121size_t size,122void *host_ptr,123cl_int *errcode_ret)124{125return cl::GetDispatch().clCreateBuffer(context, flags, size, host_ptr, errcode_ret);126}127128cl_int CL_API_CALL clRetainMemObject(cl_mem memobj)129{130return cl::GetDispatch().clRetainMemObject(memobj);131}132133cl_int CL_API_CALL clReleaseMemObject(cl_mem memobj)134{135return cl::GetDispatch().clReleaseMemObject(memobj);136}137138cl_int CL_API_CALL clGetSupportedImageFormats(cl_context context,139cl_mem_flags flags,140cl_mem_object_type image_type,141cl_uint num_entries,142cl_image_format *image_formats,143cl_uint *num_image_formats)144{145return cl::GetDispatch().clGetSupportedImageFormats(context, flags, image_type, num_entries,146image_formats, num_image_formats);147}148149cl_int CL_API_CALL clGetMemObjectInfo(cl_mem memobj,150cl_mem_info param_name,151size_t param_value_size,152void *param_value,153size_t *param_value_size_ret)154{155return cl::GetDispatch().clGetMemObjectInfo(memobj, param_name, param_value_size, param_value,156param_value_size_ret);157}158159cl_int CL_API_CALL clGetImageInfo(cl_mem image,160cl_image_info param_name,161size_t param_value_size,162void *param_value,163size_t *param_value_size_ret)164{165return cl::GetDispatch().clGetImageInfo(image, param_name, param_value_size, param_value,166param_value_size_ret);167}168169cl_int CL_API_CALL clRetainSampler(cl_sampler sampler)170{171return cl::GetDispatch().clRetainSampler(sampler);172}173174cl_int CL_API_CALL clReleaseSampler(cl_sampler sampler)175{176return cl::GetDispatch().clReleaseSampler(sampler);177}178179cl_int CL_API_CALL clGetSamplerInfo(cl_sampler sampler,180cl_sampler_info param_name,181size_t param_value_size,182void *param_value,183size_t *param_value_size_ret)184{185return cl::GetDispatch().clGetSamplerInfo(sampler, param_name, param_value_size, param_value,186param_value_size_ret);187}188189cl_program CL_API_CALL clCreateProgramWithSource(cl_context context,190cl_uint count,191const char **strings,192const size_t *lengths,193cl_int *errcode_ret)194{195return cl::GetDispatch().clCreateProgramWithSource(context, count, strings, lengths,196errcode_ret);197}198199cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context,200cl_uint num_devices,201const cl_device_id *device_list,202const size_t *lengths,203const unsigned char **binaries,204cl_int *binary_status,205cl_int *errcode_ret)206{207return cl::GetDispatch().clCreateProgramWithBinary(context, num_devices, device_list, lengths,208binaries, binary_status, errcode_ret);209}210211cl_int CL_API_CALL clRetainProgram(cl_program program)212{213return cl::GetDispatch().clRetainProgram(program);214}215216cl_int CL_API_CALL clReleaseProgram(cl_program program)217{218return cl::GetDispatch().clReleaseProgram(program);219}220221cl_int CL_API_CALL clBuildProgram(cl_program program,222cl_uint num_devices,223const cl_device_id *device_list,224const char *options,225void(CL_CALLBACK *pfn_notify)(cl_program program,226void *user_data),227void *user_data)228{229return cl::GetDispatch().clBuildProgram(program, num_devices, device_list, options, pfn_notify,230user_data);231}232233cl_int CL_API_CALL clGetProgramInfo(cl_program program,234cl_program_info param_name,235size_t param_value_size,236void *param_value,237size_t *param_value_size_ret)238{239return cl::GetDispatch().clGetProgramInfo(program, param_name, param_value_size, param_value,240param_value_size_ret);241}242243cl_int CL_API_CALL clGetProgramBuildInfo(cl_program program,244cl_device_id device,245cl_program_build_info param_name,246size_t param_value_size,247void *param_value,248size_t *param_value_size_ret)249{250return cl::GetDispatch().clGetProgramBuildInfo(program, device, param_name, param_value_size,251param_value, param_value_size_ret);252}253254cl_kernel CL_API_CALL clCreateKernel(cl_program program,255const char *kernel_name,256cl_int *errcode_ret)257{258return cl::GetDispatch().clCreateKernel(program, kernel_name, errcode_ret);259}260261cl_int CL_API_CALL clCreateKernelsInProgram(cl_program program,262cl_uint num_kernels,263cl_kernel *kernels,264cl_uint *num_kernels_ret)265{266return cl::GetDispatch().clCreateKernelsInProgram(program, num_kernels, kernels,267num_kernels_ret);268}269270cl_int CL_API_CALL clRetainKernel(cl_kernel kernel)271{272return cl::GetDispatch().clRetainKernel(kernel);273}274275cl_int CL_API_CALL clReleaseKernel(cl_kernel kernel)276{277return cl::GetDispatch().clReleaseKernel(kernel);278}279280cl_int CL_API_CALL clSetKernelArg(cl_kernel kernel,281cl_uint arg_index,282size_t arg_size,283const void *arg_value)284{285return cl::GetDispatch().clSetKernelArg(kernel, arg_index, arg_size, arg_value);286}287288cl_int CL_API_CALL clGetKernelInfo(cl_kernel kernel,289cl_kernel_info param_name,290size_t param_value_size,291void *param_value,292size_t *param_value_size_ret)293{294return cl::GetDispatch().clGetKernelInfo(kernel, param_name, param_value_size, param_value,295param_value_size_ret);296}297298cl_int CL_API_CALL clGetKernelWorkGroupInfo(cl_kernel kernel,299cl_device_id device,300cl_kernel_work_group_info param_name,301size_t param_value_size,302void *param_value,303size_t *param_value_size_ret)304{305return cl::GetDispatch().clGetKernelWorkGroupInfo(kernel, device, param_name, param_value_size,306param_value, param_value_size_ret);307}308309cl_int CL_API_CALL clWaitForEvents(cl_uint num_events, const cl_event *event_list)310{311return cl::GetDispatch().clWaitForEvents(num_events, event_list);312}313314cl_int CL_API_CALL clGetEventInfo(cl_event event,315cl_event_info param_name,316size_t param_value_size,317void *param_value,318size_t *param_value_size_ret)319{320return cl::GetDispatch().clGetEventInfo(event, param_name, param_value_size, param_value,321param_value_size_ret);322}323324cl_int CL_API_CALL clRetainEvent(cl_event event)325{326return cl::GetDispatch().clRetainEvent(event);327}328329cl_int CL_API_CALL clReleaseEvent(cl_event event)330{331return cl::GetDispatch().clReleaseEvent(event);332}333334cl_int CL_API_CALL clGetEventProfilingInfo(cl_event event,335cl_profiling_info param_name,336size_t param_value_size,337void *param_value,338size_t *param_value_size_ret)339{340return cl::GetDispatch().clGetEventProfilingInfo(event, param_name, param_value_size,341param_value, param_value_size_ret);342}343344cl_int CL_API_CALL clFlush(cl_command_queue command_queue)345{346return cl::GetDispatch().clFlush(command_queue);347}348349cl_int CL_API_CALL clFinish(cl_command_queue command_queue)350{351return cl::GetDispatch().clFinish(command_queue);352}353354cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue command_queue,355cl_mem buffer,356cl_bool blocking_read,357size_t offset,358size_t size,359void *ptr,360cl_uint num_events_in_wait_list,361const cl_event *event_wait_list,362cl_event *event)363{364return cl::GetDispatch().clEnqueueReadBuffer(command_queue, buffer, blocking_read, offset, size,365ptr, num_events_in_wait_list, event_wait_list,366event);367}368369cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue command_queue,370cl_mem buffer,371cl_bool blocking_write,372size_t offset,373size_t size,374const void *ptr,375cl_uint num_events_in_wait_list,376const cl_event *event_wait_list,377cl_event *event)378{379return cl::GetDispatch().clEnqueueWriteBuffer(command_queue, buffer, blocking_write, offset,380size, ptr, num_events_in_wait_list,381event_wait_list, event);382}383384cl_int CL_API_CALL clEnqueueCopyBuffer(cl_command_queue command_queue,385cl_mem src_buffer,386cl_mem dst_buffer,387size_t src_offset,388size_t dst_offset,389size_t size,390cl_uint num_events_in_wait_list,391const cl_event *event_wait_list,392cl_event *event)393{394return cl::GetDispatch().clEnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset,395dst_offset, size, num_events_in_wait_list,396event_wait_list, event);397}398399cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue command_queue,400cl_mem image,401cl_bool blocking_read,402const size_t *origin,403const size_t *region,404size_t row_pitch,405size_t slice_pitch,406void *ptr,407cl_uint num_events_in_wait_list,408const cl_event *event_wait_list,409cl_event *event)410{411return cl::GetDispatch().clEnqueueReadImage(command_queue, image, blocking_read, origin, region,412row_pitch, slice_pitch, ptr,413num_events_in_wait_list, event_wait_list, event);414}415416cl_int CL_API_CALL clEnqueueWriteImage(cl_command_queue command_queue,417cl_mem image,418cl_bool blocking_write,419const size_t *origin,420const size_t *region,421size_t input_row_pitch,422size_t input_slice_pitch,423const void *ptr,424cl_uint num_events_in_wait_list,425const cl_event *event_wait_list,426cl_event *event)427{428return cl::GetDispatch().clEnqueueWriteImage(command_queue, image, blocking_write, origin,429region, input_row_pitch, input_slice_pitch, ptr,430num_events_in_wait_list, event_wait_list, event);431}432433cl_int CL_API_CALL clEnqueueCopyImage(cl_command_queue command_queue,434cl_mem src_image,435cl_mem dst_image,436const size_t *src_origin,437const size_t *dst_origin,438const size_t *region,439cl_uint num_events_in_wait_list,440const cl_event *event_wait_list,441cl_event *event)442{443return cl::GetDispatch().clEnqueueCopyImage(command_queue, src_image, dst_image, src_origin,444dst_origin, region, num_events_in_wait_list,445event_wait_list, event);446}447448cl_int CL_API_CALL clEnqueueCopyImageToBuffer(cl_command_queue command_queue,449cl_mem src_image,450cl_mem dst_buffer,451const size_t *src_origin,452const size_t *region,453size_t dst_offset,454cl_uint num_events_in_wait_list,455const cl_event *event_wait_list,456cl_event *event)457{458return cl::GetDispatch().clEnqueueCopyImageToBuffer(459command_queue, src_image, dst_buffer, src_origin, region, dst_offset,460num_events_in_wait_list, event_wait_list, event);461}462463cl_int CL_API_CALL clEnqueueCopyBufferToImage(cl_command_queue command_queue,464cl_mem src_buffer,465cl_mem dst_image,466size_t src_offset,467const size_t *dst_origin,468const size_t *region,469cl_uint num_events_in_wait_list,470const cl_event *event_wait_list,471cl_event *event)472{473return cl::GetDispatch().clEnqueueCopyBufferToImage(474command_queue, src_buffer, dst_image, src_offset, dst_origin, region,475num_events_in_wait_list, event_wait_list, event);476}477478void *CL_API_CALL clEnqueueMapBuffer(cl_command_queue command_queue,479cl_mem buffer,480cl_bool blocking_map,481cl_map_flags map_flags,482size_t offset,483size_t size,484cl_uint num_events_in_wait_list,485const cl_event *event_wait_list,486cl_event *event,487cl_int *errcode_ret)488{489return cl::GetDispatch().clEnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags,490offset, size, num_events_in_wait_list,491event_wait_list, event, errcode_ret);492}493494void *CL_API_CALL clEnqueueMapImage(cl_command_queue command_queue,495cl_mem image,496cl_bool blocking_map,497cl_map_flags map_flags,498const size_t *origin,499const size_t *region,500size_t *image_row_pitch,501size_t *image_slice_pitch,502cl_uint num_events_in_wait_list,503const cl_event *event_wait_list,504cl_event *event,505cl_int *errcode_ret)506{507return cl::GetDispatch().clEnqueueMapImage(508command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch,509image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret);510}511512cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue command_queue,513cl_mem memobj,514void *mapped_ptr,515cl_uint num_events_in_wait_list,516const cl_event *event_wait_list,517cl_event *event)518{519return cl::GetDispatch().clEnqueueUnmapMemObject(520command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);521}522523cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue command_queue,524cl_kernel kernel,525cl_uint work_dim,526const size_t *global_work_offset,527const size_t *global_work_size,528const size_t *local_work_size,529cl_uint num_events_in_wait_list,530const cl_event *event_wait_list,531cl_event *event)532{533return cl::GetDispatch().clEnqueueNDRangeKernel(534command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size,535num_events_in_wait_list, event_wait_list, event);536}537538cl_int CL_API_CALL clEnqueueNativeKernel(cl_command_queue command_queue,539void(CL_CALLBACK *user_func)(void *),540void *args,541size_t cb_args,542cl_uint num_mem_objects,543const cl_mem *mem_list,544const void **args_mem_loc,545cl_uint num_events_in_wait_list,546const cl_event *event_wait_list,547cl_event *event)548{549return cl::GetDispatch().clEnqueueNativeKernel(command_queue, user_func, args, cb_args,550num_mem_objects, mem_list, args_mem_loc,551num_events_in_wait_list, event_wait_list, event);552}553554cl_int CL_API_CALL clSetCommandQueueProperty(cl_command_queue command_queue,555cl_command_queue_properties properties,556cl_bool enable,557cl_command_queue_properties *old_properties)558{559return cl::GetDispatch().clSetCommandQueueProperty(command_queue, properties, enable,560old_properties);561}562563cl_mem CL_API_CALL clCreateImage2D(cl_context context,564cl_mem_flags flags,565const cl_image_format *image_format,566size_t image_width,567size_t image_height,568size_t image_row_pitch,569void *host_ptr,570cl_int *errcode_ret)571{572return cl::GetDispatch().clCreateImage2D(context, flags, image_format, image_width,573image_height, image_row_pitch, host_ptr, errcode_ret);574}575576cl_mem CL_API_CALL clCreateImage3D(cl_context context,577cl_mem_flags flags,578const cl_image_format *image_format,579size_t image_width,580size_t image_height,581size_t image_depth,582size_t image_row_pitch,583size_t image_slice_pitch,584void *host_ptr,585cl_int *errcode_ret)586{587return cl::GetDispatch().clCreateImage3D(context, flags, image_format, image_width,588image_height, image_depth, image_row_pitch,589image_slice_pitch, host_ptr, errcode_ret);590}591592cl_int CL_API_CALL clEnqueueMarker(cl_command_queue command_queue, cl_event *event)593{594return cl::GetDispatch().clEnqueueMarker(command_queue, event);595}596597cl_int CL_API_CALL clEnqueueWaitForEvents(cl_command_queue command_queue,598cl_uint num_events,599const cl_event *event_list)600{601return cl::GetDispatch().clEnqueueWaitForEvents(command_queue, num_events, event_list);602}603604cl_int CL_API_CALL clEnqueueBarrier(cl_command_queue command_queue)605{606return cl::GetDispatch().clEnqueueBarrier(command_queue);607}608609cl_int CL_API_CALL clUnloadCompiler()610{611return cl::GetDispatch().clUnloadCompiler();612}613614void *CL_API_CALL clGetExtensionFunctionAddress(const char *func_name)615{616return cl::GetDispatch().clGetExtensionFunctionAddress(func_name);617}618619cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context,620cl_device_id device,621cl_command_queue_properties properties,622cl_int *errcode_ret)623{624return cl::GetDispatch().clCreateCommandQueue(context, device, properties, errcode_ret);625}626627cl_sampler CL_API_CALL clCreateSampler(cl_context context,628cl_bool normalized_coords,629cl_addressing_mode addressing_mode,630cl_filter_mode filter_mode,631cl_int *errcode_ret)632{633return cl::GetDispatch().clCreateSampler(context, normalized_coords, addressing_mode,634filter_mode, errcode_ret);635}636637cl_int CL_API_CALL clEnqueueTask(cl_command_queue command_queue,638cl_kernel kernel,639cl_uint num_events_in_wait_list,640const cl_event *event_wait_list,641cl_event *event)642{643return cl::GetDispatch().clEnqueueTask(command_queue, kernel, num_events_in_wait_list,644event_wait_list, event);645}646647// CL 1.1648cl_mem CL_API_CALL clCreateSubBuffer(cl_mem buffer,649cl_mem_flags flags,650cl_buffer_create_type buffer_create_type,651const void *buffer_create_info,652cl_int *errcode_ret)653{654return cl::GetDispatch().clCreateSubBuffer(buffer, flags, buffer_create_type,655buffer_create_info, errcode_ret);656}657658cl_int CL_API_CALL clSetMemObjectDestructorCallback(cl_mem memobj,659void(CL_CALLBACK *pfn_notify)(cl_mem memobj,660void *user_data),661void *user_data)662{663return cl::GetDispatch().clSetMemObjectDestructorCallback(memobj, pfn_notify, user_data);664}665666cl_event CL_API_CALL clCreateUserEvent(cl_context context, cl_int *errcode_ret)667{668return cl::GetDispatch().clCreateUserEvent(context, errcode_ret);669}670671cl_int CL_API_CALL clSetUserEventStatus(cl_event event, cl_int execution_status)672{673return cl::GetDispatch().clSetUserEventStatus(event, execution_status);674}675676cl_int CL_API_CALL clSetEventCallback(cl_event event,677cl_int command_exec_callback_type,678void(CL_CALLBACK *pfn_notify)(cl_event event,679cl_int event_command_status,680void *user_data),681void *user_data)682{683return cl::GetDispatch().clSetEventCallback(event, command_exec_callback_type, pfn_notify,684user_data);685}686687cl_int CL_API_CALL clEnqueueReadBufferRect(cl_command_queue command_queue,688cl_mem buffer,689cl_bool blocking_read,690const size_t *buffer_origin,691const size_t *host_origin,692const size_t *region,693size_t buffer_row_pitch,694size_t buffer_slice_pitch,695size_t host_row_pitch,696size_t host_slice_pitch,697void *ptr,698cl_uint num_events_in_wait_list,699const cl_event *event_wait_list,700cl_event *event)701{702return cl::GetDispatch().clEnqueueReadBufferRect(703command_queue, buffer, blocking_read, buffer_origin, host_origin, region, buffer_row_pitch,704buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list,705event_wait_list, event);706}707708cl_int CL_API_CALL clEnqueueWriteBufferRect(cl_command_queue command_queue,709cl_mem buffer,710cl_bool blocking_write,711const size_t *buffer_origin,712const size_t *host_origin,713const size_t *region,714size_t buffer_row_pitch,715size_t buffer_slice_pitch,716size_t host_row_pitch,717size_t host_slice_pitch,718const void *ptr,719cl_uint num_events_in_wait_list,720const cl_event *event_wait_list,721cl_event *event)722{723return cl::GetDispatch().clEnqueueWriteBufferRect(724command_queue, buffer, blocking_write, buffer_origin, host_origin, region, buffer_row_pitch,725buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list,726event_wait_list, event);727}728729cl_int CL_API_CALL clEnqueueCopyBufferRect(cl_command_queue command_queue,730cl_mem src_buffer,731cl_mem dst_buffer,732const size_t *src_origin,733const size_t *dst_origin,734const size_t *region,735size_t src_row_pitch,736size_t src_slice_pitch,737size_t dst_row_pitch,738size_t dst_slice_pitch,739cl_uint num_events_in_wait_list,740const cl_event *event_wait_list,741cl_event *event)742{743return cl::GetDispatch().clEnqueueCopyBufferRect(744command_queue, src_buffer, dst_buffer, src_origin, dst_origin, region, src_row_pitch,745src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list, event_wait_list,746event);747}748749// CL 1.2750cl_int CL_API_CALL clCreateSubDevices(cl_device_id in_device,751const cl_device_partition_property *properties,752cl_uint num_devices,753cl_device_id *out_devices,754cl_uint *num_devices_ret)755{756return cl::GetDispatch().clCreateSubDevices(in_device, properties, num_devices, out_devices,757num_devices_ret);758}759760cl_int CL_API_CALL clRetainDevice(cl_device_id device)761{762return cl::GetDispatch().clRetainDevice(device);763}764765cl_int CL_API_CALL clReleaseDevice(cl_device_id device)766{767return cl::GetDispatch().clReleaseDevice(device);768}769770cl_mem CL_API_CALL clCreateImage(cl_context context,771cl_mem_flags flags,772const cl_image_format *image_format,773const cl_image_desc *image_desc,774void *host_ptr,775cl_int *errcode_ret)776{777return cl::GetDispatch().clCreateImage(context, flags, image_format, image_desc, host_ptr,778errcode_ret);779}780781cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context,782cl_uint num_devices,783const cl_device_id *device_list,784const char *kernel_names,785cl_int *errcode_ret)786{787return cl::GetDispatch().clCreateProgramWithBuiltInKernels(context, num_devices, device_list,788kernel_names, errcode_ret);789}790791cl_int CL_API_CALL clCompileProgram(cl_program program,792cl_uint num_devices,793const cl_device_id *device_list,794const char *options,795cl_uint num_input_headers,796const cl_program *input_headers,797const char **header_include_names,798void(CL_CALLBACK *pfn_notify)(cl_program program,799void *user_data),800void *user_data)801{802return cl::GetDispatch().clCompileProgram(program, num_devices, device_list, options,803num_input_headers, input_headers,804header_include_names, pfn_notify, user_data);805}806807cl_program CL_API_CALL clLinkProgram(cl_context context,808cl_uint num_devices,809const cl_device_id *device_list,810const char *options,811cl_uint num_input_programs,812const cl_program *input_programs,813void(CL_CALLBACK *pfn_notify)(cl_program program,814void *user_data),815void *user_data,816cl_int *errcode_ret)817{818return cl::GetDispatch().clLinkProgram(context, num_devices, device_list, options,819num_input_programs, input_programs, pfn_notify,820user_data, errcode_ret);821}822823cl_int CL_API_CALL clUnloadPlatformCompiler(cl_platform_id platform)824{825return cl::GetDispatch().clUnloadPlatformCompiler(platform);826}827828cl_int CL_API_CALL clGetKernelArgInfo(cl_kernel kernel,829cl_uint arg_index,830cl_kernel_arg_info param_name,831size_t param_value_size,832void *param_value,833size_t *param_value_size_ret)834{835return cl::GetDispatch().clGetKernelArgInfo(kernel, arg_index, param_name, param_value_size,836param_value, param_value_size_ret);837}838839cl_int CL_API_CALL clEnqueueFillBuffer(cl_command_queue command_queue,840cl_mem buffer,841const void *pattern,842size_t pattern_size,843size_t offset,844size_t size,845cl_uint num_events_in_wait_list,846const cl_event *event_wait_list,847cl_event *event)848{849return cl::GetDispatch().clEnqueueFillBuffer(command_queue, buffer, pattern, pattern_size,850offset, size, num_events_in_wait_list,851event_wait_list, event);852}853854cl_int CL_API_CALL clEnqueueFillImage(cl_command_queue command_queue,855cl_mem image,856const void *fill_color,857const size_t *origin,858const size_t *region,859cl_uint num_events_in_wait_list,860const cl_event *event_wait_list,861cl_event *event)862{863return cl::GetDispatch().clEnqueueFillImage(command_queue, image, fill_color, origin, region,864num_events_in_wait_list, event_wait_list, event);865}866867cl_int CL_API_CALL clEnqueueMigrateMemObjects(cl_command_queue command_queue,868cl_uint num_mem_objects,869const cl_mem *mem_objects,870cl_mem_migration_flags flags,871cl_uint num_events_in_wait_list,872const cl_event *event_wait_list,873cl_event *event)874{875return cl::GetDispatch().clEnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects,876flags, num_events_in_wait_list,877event_wait_list, event);878}879880cl_int CL_API_CALL clEnqueueMarkerWithWaitList(cl_command_queue command_queue,881cl_uint num_events_in_wait_list,882const cl_event *event_wait_list,883cl_event *event)884{885return cl::GetDispatch().clEnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list,886event_wait_list, event);887}888889cl_int CL_API_CALL clEnqueueBarrierWithWaitList(cl_command_queue command_queue,890cl_uint num_events_in_wait_list,891const cl_event *event_wait_list,892cl_event *event)893{894return cl::GetDispatch().clEnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list,895event_wait_list, event);896}897898void *CL_API_CALL clGetExtensionFunctionAddressForPlatform(cl_platform_id platform,899const char *func_name)900{901return cl::GetDispatch().clGetExtensionFunctionAddressForPlatform(platform, func_name);902}903904// CL 2.0905cl_command_queue CL_API_CALL906clCreateCommandQueueWithProperties(cl_context context,907cl_device_id device,908const cl_queue_properties *properties,909cl_int *errcode_ret)910{911return cl::GetDispatch().clCreateCommandQueueWithProperties(context, device, properties,912errcode_ret);913}914915cl_mem CL_API_CALL clCreatePipe(cl_context context,916cl_mem_flags flags,917cl_uint pipe_packet_size,918cl_uint pipe_max_packets,919const cl_pipe_properties *properties,920cl_int *errcode_ret)921{922return cl::GetDispatch().clCreatePipe(context, flags, pipe_packet_size, pipe_max_packets,923properties, errcode_ret);924}925926cl_int CL_API_CALL clGetPipeInfo(cl_mem pipe,927cl_pipe_info param_name,928size_t param_value_size,929void *param_value,930size_t *param_value_size_ret)931{932return cl::GetDispatch().clGetPipeInfo(pipe, param_name, param_value_size, param_value,933param_value_size_ret);934}935936void *CL_API_CALL clSVMAlloc(cl_context context,937cl_svm_mem_flags flags,938size_t size,939cl_uint alignment)940{941return cl::GetDispatch().clSVMAlloc(context, flags, size, alignment);942}943944void CL_API_CALL clSVMFree(cl_context context, void *svm_pointer)945{946return cl::GetDispatch().clSVMFree(context, svm_pointer);947}948949cl_sampler CL_API_CALL950clCreateSamplerWithProperties(cl_context context,951const cl_sampler_properties *sampler_properties,952cl_int *errcode_ret)953{954return cl::GetDispatch().clCreateSamplerWithProperties(context, sampler_properties,955errcode_ret);956}957958cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel,959cl_uint arg_index,960const void *arg_value)961{962return cl::GetDispatch().clSetKernelArgSVMPointer(kernel, arg_index, arg_value);963}964965cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel,966cl_kernel_exec_info param_name,967size_t param_value_size,968const void *param_value)969{970return cl::GetDispatch().clSetKernelExecInfo(kernel, param_name, param_value_size, param_value);971}972973cl_int CL_API_CALL clEnqueueSVMFree(cl_command_queue command_queue,974cl_uint num_svm_pointers,975void *svm_pointers[],976void(CL_CALLBACK *pfn_free_func)(cl_command_queue queue,977cl_uint num_svm_pointers,978void *svm_pointers[],979void *user_data),980void *user_data,981cl_uint num_events_in_wait_list,982const cl_event *event_wait_list,983cl_event *event)984{985return cl::GetDispatch().clEnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers,986pfn_free_func, user_data, num_events_in_wait_list,987event_wait_list, event);988}989990cl_int CL_API_CALL clEnqueueSVMMemcpy(cl_command_queue command_queue,991cl_bool blocking_copy,992void *dst_ptr,993const void *src_ptr,994size_t size,995cl_uint num_events_in_wait_list,996const cl_event *event_wait_list,997cl_event *event)998{999return cl::GetDispatch().clEnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr,1000size, num_events_in_wait_list, event_wait_list,1001event);1002}10031004cl_int CL_API_CALL clEnqueueSVMMemFill(cl_command_queue command_queue,1005void *svm_ptr,1006const void *pattern,1007size_t pattern_size,1008size_t size,1009cl_uint num_events_in_wait_list,1010const cl_event *event_wait_list,1011cl_event *event)1012{1013return cl::GetDispatch().clEnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size,1014size, num_events_in_wait_list, event_wait_list,1015event);1016}10171018cl_int CL_API_CALL clEnqueueSVMMap(cl_command_queue command_queue,1019cl_bool blocking_map,1020cl_map_flags flags,1021void *svm_ptr,1022size_t size,1023cl_uint num_events_in_wait_list,1024const cl_event *event_wait_list,1025cl_event *event)1026{1027return cl::GetDispatch().clEnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size,1028num_events_in_wait_list, event_wait_list, event);1029}10301031cl_int CL_API_CALL clEnqueueSVMUnmap(cl_command_queue command_queue,1032void *svm_ptr,1033cl_uint num_events_in_wait_list,1034const cl_event *event_wait_list,1035cl_event *event)1036{1037return cl::GetDispatch().clEnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list,1038event_wait_list, event);1039}10401041// CL 2.11042cl_int CL_API_CALL clSetDefaultDeviceCommandQueue(cl_context context,1043cl_device_id device,1044cl_command_queue command_queue)1045{1046return cl::GetDispatch().clSetDefaultDeviceCommandQueue(context, device, command_queue);1047}10481049cl_int CL_API_CALL clGetDeviceAndHostTimer(cl_device_id device,1050cl_ulong *device_timestamp,1051cl_ulong *host_timestamp)1052{1053return cl::GetDispatch().clGetDeviceAndHostTimer(device, device_timestamp, host_timestamp);1054}10551056cl_int CL_API_CALL clGetHostTimer(cl_device_id device, cl_ulong *host_timestamp)1057{1058return cl::GetDispatch().clGetHostTimer(device, host_timestamp);1059}10601061cl_program CL_API_CALL clCreateProgramWithIL(cl_context context,1062const void *il,1063size_t length,1064cl_int *errcode_ret)1065{1066return cl::GetDispatch().clCreateProgramWithIL(context, il, length, errcode_ret);1067}10681069cl_kernel CL_API_CALL clCloneKernel(cl_kernel source_kernel, cl_int *errcode_ret)1070{1071return cl::GetDispatch().clCloneKernel(source_kernel, errcode_ret);1072}10731074cl_int CL_API_CALL clGetKernelSubGroupInfo(cl_kernel kernel,1075cl_device_id device,1076cl_kernel_sub_group_info param_name,1077size_t input_value_size,1078const void *input_value,1079size_t param_value_size,1080void *param_value,1081size_t *param_value_size_ret)1082{1083return cl::GetDispatch().clGetKernelSubGroupInfo(kernel, device, param_name, input_value_size,1084input_value, param_value_size, param_value,1085param_value_size_ret);1086}10871088cl_int CL_API_CALL clEnqueueSVMMigrateMem(cl_command_queue command_queue,1089cl_uint num_svm_pointers,1090const void **svm_pointers,1091const size_t *sizes,1092cl_mem_migration_flags flags,1093cl_uint num_events_in_wait_list,1094const cl_event *event_wait_list,1095cl_event *event)1096{1097return cl::GetDispatch().clEnqueueSVMMigrateMem(command_queue, num_svm_pointers, svm_pointers,1098sizes, flags, num_events_in_wait_list,1099event_wait_list, event);1100}11011102// CL 2.21103cl_int CL_API_CALL clSetProgramReleaseCallback(cl_program program,1104void(CL_CALLBACK *pfn_notify)(cl_program program,1105void *user_data),1106void *user_data)1107{1108return cl::GetDispatch().clSetProgramReleaseCallback(program, pfn_notify, user_data);1109}11101111cl_int CL_API_CALL clSetProgramSpecializationConstant(cl_program program,1112cl_uint spec_id,1113size_t spec_size,1114const void *spec_value)1115{1116return cl::GetDispatch().clSetProgramSpecializationConstant(program, spec_id, spec_size,1117spec_value);1118}11191120// CL 3.01121cl_int CL_API_CALL clSetContextDestructorCallback(cl_context context,1122void(CL_CALLBACK *pfn_notify)(cl_context context,1123void *user_data),1124void *user_data)1125{1126return cl::GetDispatch().clSetContextDestructorCallback(context, pfn_notify, user_data);1127}11281129cl_mem CL_API_CALL clCreateBufferWithProperties(cl_context context,1130const cl_mem_properties *properties,1131cl_mem_flags flags,1132size_t size,1133void *host_ptr,1134cl_int *errcode_ret)1135{1136return cl::GetDispatch().clCreateBufferWithProperties(context, properties, flags, size,1137host_ptr, errcode_ret);1138}11391140cl_mem CL_API_CALL clCreateImageWithProperties(cl_context context,1141const cl_mem_properties *properties,1142cl_mem_flags flags,1143const cl_image_format *image_format,1144const cl_image_desc *image_desc,1145void *host_ptr,1146cl_int *errcode_ret)1147{1148return cl::GetDispatch().clCreateImageWithProperties(context, properties, flags, image_format,1149image_desc, host_ptr, errcode_ret);1150}11511152// cl_khr_icd1153cl_int CL_API_CALL clIcdGetPlatformIDsKHR(cl_uint num_entries,1154cl_platform_id *platforms,1155cl_uint *num_platforms)1156{1157return cl::GetDispatch().clIcdGetPlatformIDsKHR(num_entries, platforms, num_platforms);1158}11591160} // extern "C"116111621163