1bf215546Sopenharmony_ci//
2bf215546Sopenharmony_ci// Copyright 2013 Francisco Jerez
3bf215546Sopenharmony_ci//
4bf215546Sopenharmony_ci// Permission is hereby granted, free of charge, to any person obtaining a
5bf215546Sopenharmony_ci// copy of this software and associated documentation files (the "Software"),
6bf215546Sopenharmony_ci// to deal in the Software without restriction, including without limitation
7bf215546Sopenharmony_ci// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8bf215546Sopenharmony_ci// and/or sell copies of the Software, and to permit persons to whom the
9bf215546Sopenharmony_ci// Software is furnished to do so, subject to the following conditions:
10bf215546Sopenharmony_ci//
11bf215546Sopenharmony_ci// The above copyright notice and this permission notice shall be included in
12bf215546Sopenharmony_ci// all copies or substantial portions of the Software.
13bf215546Sopenharmony_ci//
14bf215546Sopenharmony_ci// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15bf215546Sopenharmony_ci// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16bf215546Sopenharmony_ci// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17bf215546Sopenharmony_ci// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18bf215546Sopenharmony_ci// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19bf215546Sopenharmony_ci// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20bf215546Sopenharmony_ci// OTHER DEALINGS IN THE SOFTWARE.
21bf215546Sopenharmony_ci//
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_ci#include "api/dispatch.hpp"
24bf215546Sopenharmony_ci
25bf215546Sopenharmony_cinamespace clover {
26bf215546Sopenharmony_ci   const cl_icd_dispatch _dispatch = {
27bf215546Sopenharmony_ci      // OpenCL 1.0
28bf215546Sopenharmony_ci      clGetPlatformIDs,
29bf215546Sopenharmony_ci      GetPlatformInfo,
30bf215546Sopenharmony_ci      clGetDeviceIDs,
31bf215546Sopenharmony_ci      clGetDeviceInfo,
32bf215546Sopenharmony_ci      clCreateContext,
33bf215546Sopenharmony_ci      clCreateContextFromType,
34bf215546Sopenharmony_ci      clRetainContext,
35bf215546Sopenharmony_ci      clReleaseContext,
36bf215546Sopenharmony_ci      clGetContextInfo,
37bf215546Sopenharmony_ci      clCreateCommandQueue,
38bf215546Sopenharmony_ci      clRetainCommandQueue,
39bf215546Sopenharmony_ci      clReleaseCommandQueue,
40bf215546Sopenharmony_ci      clGetCommandQueueInfo,
41bf215546Sopenharmony_ci      NULL, // clSetCommandQueueProperty
42bf215546Sopenharmony_ci      clCreateBuffer,
43bf215546Sopenharmony_ci      clCreateImage2D,
44bf215546Sopenharmony_ci      clCreateImage3D,
45bf215546Sopenharmony_ci      clRetainMemObject,
46bf215546Sopenharmony_ci      clReleaseMemObject,
47bf215546Sopenharmony_ci      clGetSupportedImageFormats,
48bf215546Sopenharmony_ci      clGetMemObjectInfo,
49bf215546Sopenharmony_ci      clGetImageInfo,
50bf215546Sopenharmony_ci      clCreateSampler,
51bf215546Sopenharmony_ci      clRetainSampler,
52bf215546Sopenharmony_ci      clReleaseSampler,
53bf215546Sopenharmony_ci      clGetSamplerInfo,
54bf215546Sopenharmony_ci      clCreateProgramWithSource,
55bf215546Sopenharmony_ci      clCreateProgramWithBinary,
56bf215546Sopenharmony_ci      clRetainProgram,
57bf215546Sopenharmony_ci      clReleaseProgram,
58bf215546Sopenharmony_ci      clBuildProgram,
59bf215546Sopenharmony_ci      clUnloadCompiler,
60bf215546Sopenharmony_ci      clGetProgramInfo,
61bf215546Sopenharmony_ci      clGetProgramBuildInfo,
62bf215546Sopenharmony_ci      clCreateKernel,
63bf215546Sopenharmony_ci      clCreateKernelsInProgram,
64bf215546Sopenharmony_ci      clRetainKernel,
65bf215546Sopenharmony_ci      clReleaseKernel,
66bf215546Sopenharmony_ci      clSetKernelArg,
67bf215546Sopenharmony_ci      clGetKernelInfo,
68bf215546Sopenharmony_ci      clGetKernelWorkGroupInfo,
69bf215546Sopenharmony_ci      clWaitForEvents,
70bf215546Sopenharmony_ci      clGetEventInfo,
71bf215546Sopenharmony_ci      clRetainEvent,
72bf215546Sopenharmony_ci      clReleaseEvent,
73bf215546Sopenharmony_ci      clGetEventProfilingInfo,
74bf215546Sopenharmony_ci      clFlush,
75bf215546Sopenharmony_ci      clFinish,
76bf215546Sopenharmony_ci      clEnqueueReadBuffer,
77bf215546Sopenharmony_ci      clEnqueueWriteBuffer,
78bf215546Sopenharmony_ci      clEnqueueCopyBuffer,
79bf215546Sopenharmony_ci      clEnqueueReadImage,
80bf215546Sopenharmony_ci      clEnqueueWriteImage,
81bf215546Sopenharmony_ci      clEnqueueCopyImage,
82bf215546Sopenharmony_ci      clEnqueueCopyImageToBuffer,
83bf215546Sopenharmony_ci      clEnqueueCopyBufferToImage,
84bf215546Sopenharmony_ci      clEnqueueMapBuffer,
85bf215546Sopenharmony_ci      clEnqueueMapImage,
86bf215546Sopenharmony_ci      clEnqueueUnmapMemObject,
87bf215546Sopenharmony_ci      clEnqueueNDRangeKernel,
88bf215546Sopenharmony_ci      clEnqueueTask,
89bf215546Sopenharmony_ci      clEnqueueNativeKernel,
90bf215546Sopenharmony_ci      clEnqueueMarker,
91bf215546Sopenharmony_ci      clEnqueueWaitForEvents,
92bf215546Sopenharmony_ci      clEnqueueBarrier,
93bf215546Sopenharmony_ci      GetExtensionFunctionAddress,
94bf215546Sopenharmony_ci      NULL, // clCreateFromGLBuffer
95bf215546Sopenharmony_ci      NULL, // clCreateFromGLTexture2D
96bf215546Sopenharmony_ci      NULL, // clCreateFromGLTexture3D
97bf215546Sopenharmony_ci      NULL, // clCreateFromGLRenderbuffer
98bf215546Sopenharmony_ci      NULL, // clGetGLObjectInfo
99bf215546Sopenharmony_ci      NULL, // clGetGLTextureInfo
100bf215546Sopenharmony_ci      NULL, // clEnqueueAcquireGLObjects
101bf215546Sopenharmony_ci      NULL, // clEnqueueReleaseGLObjects
102bf215546Sopenharmony_ci
103bf215546Sopenharmony_ci      // cl_khr_d3d10_sharing
104bf215546Sopenharmony_ci      NULL, // clGetGLContextInfoKHR
105bf215546Sopenharmony_ci      NULL, // clGetDeviceIDsFromD3D10KHR
106bf215546Sopenharmony_ci      NULL, // clCreateFromD3D10BufferKHR
107bf215546Sopenharmony_ci      NULL, // clCreateFromD3D10Texture2DKHR
108bf215546Sopenharmony_ci      NULL, // clCreateFromD3D10Texture3DKHR
109bf215546Sopenharmony_ci      NULL, // clEnqueueAcquireD3D10ObjectsKHR
110bf215546Sopenharmony_ci      NULL, // clEnqueueReleaseD3D10ObjectsKHR
111bf215546Sopenharmony_ci
112bf215546Sopenharmony_ci      // OpenCL 1.1
113bf215546Sopenharmony_ci      clSetEventCallback,
114bf215546Sopenharmony_ci      clCreateSubBuffer,
115bf215546Sopenharmony_ci      clSetMemObjectDestructorCallback,
116bf215546Sopenharmony_ci      clCreateUserEvent,
117bf215546Sopenharmony_ci      clSetUserEventStatus,
118bf215546Sopenharmony_ci      clEnqueueReadBufferRect,
119bf215546Sopenharmony_ci      clEnqueueWriteBufferRect,
120bf215546Sopenharmony_ci      clEnqueueCopyBufferRect,
121bf215546Sopenharmony_ci
122bf215546Sopenharmony_ci      // cl_ext_device_fission
123bf215546Sopenharmony_ci      NULL, // clCreateSubDevicesEXT
124bf215546Sopenharmony_ci      NULL, // clRetainDeviceEXT
125bf215546Sopenharmony_ci      NULL, // clReleaseDeviceEXT
126bf215546Sopenharmony_ci
127bf215546Sopenharmony_ci      // cl_khr_gl_event
128bf215546Sopenharmony_ci      NULL, // clCreateEventFromGLsyncKHR
129bf215546Sopenharmony_ci
130bf215546Sopenharmony_ci      // OpenCL 1.2
131bf215546Sopenharmony_ci      clCreateSubDevices,
132bf215546Sopenharmony_ci      clRetainDevice,
133bf215546Sopenharmony_ci      clReleaseDevice,
134bf215546Sopenharmony_ci      clCreateImage,
135bf215546Sopenharmony_ci      clCreateProgramWithBuiltInKernels,
136bf215546Sopenharmony_ci      clCompileProgram,
137bf215546Sopenharmony_ci      clLinkProgram,
138bf215546Sopenharmony_ci      clUnloadPlatformCompiler,
139bf215546Sopenharmony_ci      clGetKernelArgInfo,
140bf215546Sopenharmony_ci      clEnqueueFillBuffer,
141bf215546Sopenharmony_ci      clEnqueueFillImage,
142bf215546Sopenharmony_ci      clEnqueueMigrateMemObjects,
143bf215546Sopenharmony_ci      clEnqueueMarkerWithWaitList,
144bf215546Sopenharmony_ci      clEnqueueBarrierWithWaitList,
145bf215546Sopenharmony_ci      GetExtensionFunctionAddressForPlatform,
146bf215546Sopenharmony_ci      NULL, // clCreateFromGLTexture
147bf215546Sopenharmony_ci
148bf215546Sopenharmony_ci      // cl_khr_d3d11_sharing
149bf215546Sopenharmony_ci      NULL, // clGetDeviceIDsFromD3D11KHR
150bf215546Sopenharmony_ci      NULL, // clCreateFromD3D11BufferKHR
151bf215546Sopenharmony_ci      NULL, // clCreateFromD3D11Texture2DKHR
152bf215546Sopenharmony_ci      NULL, // clCreateFromD3D11Texture3DKHR
153bf215546Sopenharmony_ci      NULL, // clCreateFromDX9MediaSurfaceKHR
154bf215546Sopenharmony_ci      NULL, // clEnqueueAcquireD3D11ObjectsKHR
155bf215546Sopenharmony_ci      NULL, // clEnqueueReleaseD3D11ObjectsKHR
156bf215546Sopenharmony_ci
157bf215546Sopenharmony_ci      // cl_khr_dx9_media_sharing
158bf215546Sopenharmony_ci      NULL, // clGetDeviceIDsFromDX9MediaAdapterKHR
159bf215546Sopenharmony_ci      NULL, // clEnqueueAcquireDX9MediaSurfacesKHR
160bf215546Sopenharmony_ci      NULL, // clEnqueueReleaseDX9MediaSurfacesKHR
161bf215546Sopenharmony_ci
162bf215546Sopenharmony_ci      // cl_khr_egl_image
163bf215546Sopenharmony_ci      NULL, // clCreateFromEGLImageKHR
164bf215546Sopenharmony_ci      NULL, // clEnqueueAcquireEGLObjectsKHR
165bf215546Sopenharmony_ci      NULL, // clEnqueueReleaseEGLObjectsKHR
166bf215546Sopenharmony_ci
167bf215546Sopenharmony_ci      // cl_khr_egl_event
168bf215546Sopenharmony_ci      NULL, // clCreateEventFromEGLSyncKHR
169bf215546Sopenharmony_ci
170bf215546Sopenharmony_ci      // OpenCL 2.0
171bf215546Sopenharmony_ci      clCreateCommandQueueWithProperties,
172bf215546Sopenharmony_ci      clCreatePipe,
173bf215546Sopenharmony_ci      clGetPipeInfo,
174bf215546Sopenharmony_ci      clSVMAlloc,
175bf215546Sopenharmony_ci      clSVMFree,
176bf215546Sopenharmony_ci      clEnqueueSVMFree,
177bf215546Sopenharmony_ci      clEnqueueSVMMemcpy,
178bf215546Sopenharmony_ci      clEnqueueSVMMemFill,
179bf215546Sopenharmony_ci      clEnqueueSVMMap,
180bf215546Sopenharmony_ci      clEnqueueSVMUnmap,
181bf215546Sopenharmony_ci      NULL, // clCreateSamplerWithProperties
182bf215546Sopenharmony_ci      clSetKernelArgSVMPointer,
183bf215546Sopenharmony_ci      clSetKernelExecInfo,
184bf215546Sopenharmony_ci
185bf215546Sopenharmony_ci      // cl_khr_sub_groups
186bf215546Sopenharmony_ci      NULL, // clGetKernelSubGroupInfoKHR
187bf215546Sopenharmony_ci
188bf215546Sopenharmony_ci      // OpenCL 2.1
189bf215546Sopenharmony_ci      NULL, // clCloneKernel
190bf215546Sopenharmony_ci      clCreateProgramWithIL,
191bf215546Sopenharmony_ci      clEnqueueSVMMigrateMem,
192bf215546Sopenharmony_ci      clGetDeviceAndHostTimer,
193bf215546Sopenharmony_ci      clGetHostTimer,
194bf215546Sopenharmony_ci      clGetKernelSubGroupInfo,
195bf215546Sopenharmony_ci      clSetDefaultDeviceCommandQueue,
196bf215546Sopenharmony_ci
197bf215546Sopenharmony_ci      // OpenCL 2.2
198bf215546Sopenharmony_ci      clSetProgramReleaseCallback,
199bf215546Sopenharmony_ci      clSetProgramSpecializationConstant,
200bf215546Sopenharmony_ci      clCreateBufferWithProperties,
201bf215546Sopenharmony_ci      clCreateImageWithProperties,
202bf215546Sopenharmony_ci      clSetContextDestructorCallback
203bf215546Sopenharmony_ci   };
204bf215546Sopenharmony_ci}
205