Small fixes
[panamaz] / test-opencl-basic / opencl.api
1
2 struct cl_image_format access=rwi {
3 }
4
5 struct /^_cl/ access= rename=s/^_cl/cl/ {
6 }
7
8
9 # idea: dynamic will have a constructor that takes a SymbolLookup
10 #       and ResourceScope
11 #library CLExt dynamic {
12 #               clIcdGetPlatformIDsKHR
13 #}
14
15 library CL {
16         define:CLConstants
17
18         # core functions, resolved by dlopen
19         clGetPlatformIDs
20         clGetPlatformInfo
21         clGetDeviceIDs
22         clGetDeviceInfo
23         clCreateSubDevices
24         clRetainDevice
25         clReleaseDevice
26         clSetDefaultDeviceCommandQueue
27         clGetDeviceAndHostTimer
28         clGetHostTimer
29         clCreateContext
30         clCreateContextFromType
31         clRetainContext
32         clReleaseContext
33         clGetContextInfo
34         clCreateCommandQueueWithProperties
35         clRetainCommandQueue
36         clReleaseCommandQueue
37         clGetCommandQueueInfo
38         clCreateBuffer
39         clCreateSubBuffer
40         clCreateImage
41         clCreatePipe
42         clRetainMemObject
43         clReleaseMemObject
44         clGetSupportedImageFormats
45         clGetMemObjectInfo
46         clGetImageInfo
47         clGetPipeInfo
48         clSetMemObjectDestructorCallback
49         clSVMAlloc
50         clSVMFree
51         clCreateSamplerWithProperties
52         clRetainSampler
53         clReleaseSampler
54         clGetSamplerInfo
55         clCreateProgramWithSource
56         clCreateProgramWithBinary
57         clCreateProgramWithBuiltInKernels
58         clCreateProgramWithIL
59         clRetainProgram
60         clReleaseProgram
61         clBuildProgram
62         clCompileProgram
63         clLinkProgram
64         clUnloadPlatformCompiler
65         clGetProgramInfo
66         clGetProgramBuildInfo
67         clCreateKernel
68         clCreateKernelsInProgram
69         clCloneKernel
70         clRetainKernel
71         clReleaseKernel
72         clSetKernelArg
73         clSetKernelArgSVMPointer
74         clSetKernelExecInfo
75         clGetKernelInfo
76         clGetKernelArgInfo
77         clGetKernelWorkGroupInfo
78         clGetKernelSubGroupInfo
79         clWaitForEvents
80         clGetEventInfo
81         clCreateUserEvent
82         clRetainEvent
83         clReleaseEvent
84         clSetUserEventStatus
85         clSetEventCallback
86         clGetEventProfilingInfo
87         clFlush
88         clFinish
89         clEnqueueReadBuffer
90         clEnqueueReadBufferRect
91         clEnqueueWriteBuffer
92         clEnqueueWriteBufferRect
93         clEnqueueFillBuffer
94         clEnqueueCopyBuffer
95         clEnqueueCopyBufferRect
96         clEnqueueReadImage
97         clEnqueueWriteImage
98         clEnqueueFillImage
99         clEnqueueCopyImage
100         clEnqueueCopyImageToBuffer
101         clEnqueueCopyBufferToImage
102         clEnqueueMapBuffer
103         clEnqueueMapImage
104         clEnqueueUnmapMemObject
105         clEnqueueMigrateMemObjects
106         clEnqueueNDRangeKernel
107         clEnqueueNativeKernel
108         clEnqueueMarkerWithWaitList
109         clEnqueueBarrierWithWaitList
110         clEnqueueSVMFree
111         clEnqueueSVMMemcpy
112         clEnqueueSVMMemFill
113         clEnqueueSVMMap
114         clEnqueueSVMUnmap
115         clEnqueueSVMMigrateMem
116         clGetExtensionFunctionAddressForPlatform
117         clCreateImage2D
118         clCreateImage3D
119         clEnqueueMarker
120         clEnqueueWaitForEvents
121         clEnqueueBarrier
122         clUnloadCompiler
123         clGetExtensionFunctionAddress
124         clCreateCommandQueue
125         clCreateSampler
126         clEnqueueTask
127 }
128
129
130 # base constants
131 define CLConstants opencl.h {
132         /.*/cl.h/             file-include
133 }
134
135 define CLPlatformConstants opencl.h {
136         /^CL_API_/                      exclude
137         CL_PROGRAM_STRING_DEBUG_INFO    exclude
138         /^__CL_/                        exclude
139         # huge/nan/infinity in c aren't compatible with java's string representation
140         CL_HUGE_VALF|CL_HUGE_VAL|CL_NAN|CL_INFINITY     exclude
141         /.*/cl_platform.h/              file-include
142
143 }
144
145 func clGetPlatformIDs {
146      num_entries     implied=Memory.length(platforms)
147 }
148
149 func clGetDeviceIDs {
150      num_entries     implied=Memory.length(devices)
151 }
152
153 func clCreateContext {
154      num_devices     implied=Memory.length(devices)
155      errcode_ret     result_code  success=CL_SUCCESS
156 }
157
158 func /clCreate/ {
159      errcode_ret     result_code  success=CL_SUCCESS
160 }
161
162 func clGetSupportedImageFormats {
163      num_entries     implied=(image_formats!=null?image_formats.length():0)
164 }