blob: fc04d2b0c2361e23ae5d8f52f6dfcfe7d2185d12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
Include cl-common.cfg
Style ImplOnly
#imports for all generated java files
Import com.jogamp.opencl.*
Import com.jogamp.opencl.gl.CLGLI
ClassJavadoc CLImpl /**
ClassJavadoc CLImpl * Java bindings to OpenCL, the Open Computing Language.
ClassJavadoc CLImpl * @author Michael Bien
ClassJavadoc CLImpl */
ImplJavaClass CLImpl
Implements CLImpl CLGLI
EmitProcAddressTable true
ProcAddressTableClassName CLProcAddressTable
GetProcAddressTableExpr addressTable
ProcAddressNameExpr $UpperCase(arg)
#dynamic binding for OpenGL specific functions
ForceProcAddressGen clGetGLContextInfoKHR
ForceProcAddressGen clCreateFromGLBuffer
ForceProcAddressGen clCreateFromGLRenderbuffer
ForceProcAddressGen clCreateFromGLTexture2D
ForceProcAddressGen clCreateFromGLTexture3D
ForceProcAddressGen clEnqueueAcquireGLObjects
ForceProcAddressGen clEnqueueReleaseGLObjects
ForceProcAddressGen clGetGLObjectInfo
ForceProcAddressGen clGetGLTextureInfo
ForceProcAddressGen clIcdGetPlatformIDsKHR
Unignore clGetExtensionFunctionAddress
RenameJavaMethod clGetExtensionFunctionAddress clGetExtensionFunctionAddressImpl
AccessControl clGetExtensionFunctionAddressImpl PRIVATE
ArgumentIsString clGetExtensionFunctionAddressImpl 0
#append to generated c files
CustomCCode #include <CL/cl.h>
CustomCCode #include <GL3/gl3.h>
CustomCCode #include <inttypes.h>
# implement manually via custom code
Ignore clCreateContext
Ignore clCreateContextFromType
Ignore clBuildProgram
Ignore clEnqueueNativeKernel
Ignore clReleaseContext
#take buffer capacity from input param 5
ReturnValueCapacity clEnqueueMapBuffer {5}
#this one is more complicated, we have to calculate the capacity with custom code
ManuallyImplement clEnqueueMapImage
#include custom code
IncludeAs CustomJavaCode CLImpl clImplCustomCode.java
IncludeAs CustomCCode clImplCustomCode.c
#JavaEpilogue clCreateKernelsInProgram if(kernels!=null && CPU.is32Bit() && kernels.lenght > 1) { convert32To64(kernels); }
|