aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/cl-impl-20.cfg
diff options
context:
space:
mode:
authorWade Walker <[email protected]>2015-09-07 14:46:52 -0500
committerWade Walker <[email protected]>2015-11-08 14:05:28 -0600
commite56a17d6d7780b8597c78ce50808c8da68d094b5 (patch)
treea37f9d5f351dd0b85844521ad7d6897fcecc062c /make/config/cl-impl-20.cfg
parent85dc2b1357470d2a51a69080d33aac442eae291f (diff)
Add OpenCL 1.2 and 2.0 headers and CLImpl classes
Added stub includes for OpenCL 1.2 and 2.0. Added new CLImpl versions for 1.2 and 2.0 to the build, but left them unused for now. The CL bindings used by JOCL are still generated from OpenCL 1.1, so the existing Java code will be able to stay mostly unchanged in the future.
Diffstat (limited to 'make/config/cl-impl-20.cfg')
-rw-r--r--make/config/cl-impl-20.cfg105
1 files changed, 105 insertions, 0 deletions
diff --git a/make/config/cl-impl-20.cfg b/make/config/cl-impl-20.cfg
new file mode 100644
index 00000000..5b0a9125
--- /dev/null
+++ b/make/config/cl-impl-20.cfg
@@ -0,0 +1,105 @@
+Include cl-common.cfg
+NativeOutputDir gensrc/native/jocl20
+
+Style ImplOnly
+
+#imports for all generated java files
+Import com.jogamp.opencl.llb.gl.CLGL
+Import java.security.AccessController
+Import java.security.PrivilegedAction
+
+ClassJavadoc CLAbstractImpl20 /**
+ClassJavadoc CLAbstractImpl20 * Java bindings to OpenCL, the Open Computing Language (generated).
+ClassJavadoc CLAbstractImpl20 * @author Michael Bien, GlueGen, et al.
+ClassJavadoc CLAbstractImpl20 */
+
+ImplJavaClass CLAbstractImpl20
+AccessControl CLAbstractImpl20 PUBLIC_ABSTRACT
+Implements CLAbstractImpl20 CLGL
+
+LocalProcAddressCallingConvention __ALL__ CL_API_CALL
+
+EmitProcAddressTable true
+ProcAddressTableClassName CLProcAddressTable20
+GetProcAddressTableExpr addressTable
+ProcAddressNameExpr $UpperCase(arg)
+ForceProcAddressGen __ALL__
+
+#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 clCreateEventFromGLsyncKHR
+#ForceProcAddressGen clIcdGetPlatformIDsKHR
+#ForceProcAddressGen clCreateSubBuffer
+#ForceProcAddressGen clCreateSubDevicesEXT
+#ForceProcAddressGen clCreateUserEvent
+#ForceProcAddressGen clEnqueueCopyBufferRect
+#ForceProcAddressGen clEnqueueReadBufferRect
+#ForceProcAddressGen clEnqueueWriteBufferRect
+#ForceProcAddressGen clReleaseDeviceEXT
+#ForceProcAddressGen clRetainDeviceEXT
+#ForceProcAddressGen clSetUserEventStatus
+
+#...or force all
+ForceProcAddressGen __ALL__
+
+#
+# extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
+#
+Ignore clGetExtensionFunctionAddress
+ForceProcAddressGen clGetExtensionFunctionAddress
+
+#append to generated c files
+CustomCCode #include <CL/cl.h>
+CustomCCode #include <CL/cl_ext.h>
+CustomCCode #include <CL/cl_gl.h>
+CustomCCode #include <GL/glcorearb.h>
+CustomCCode #include <inttypes.h>
+
+# implement manually via custom code
+Ignore clCreateContext
+ForceProcAddressGen clCreateContext
+
+Ignore clCreateContextFromType
+ForceProcAddressGen clCreateContextFromType
+
+Ignore clBuildProgram
+ForceProcAddressGen clBuildProgram
+
+Ignore clCompileProgram
+ForceProcAddressGen clCompileProgram
+
+Ignore clLinkProgram
+ForceProcAddressGen clLinkProgram
+
+Ignore clEnqueueNativeKernel
+ForceProcAddressGen clEnqueueNativeKernel
+
+Ignore clReleaseContext
+ForceProcAddressGen clReleaseContext
+
+Ignore clSetEventCallback
+ForceProcAddressGen clSetEventCallback
+
+Ignore clSetMemObjectDestructorCallback
+ForceProcAddressGen clSetMemObjectDestructorCallback
+
+#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
+ForceProcAddressGen clEnqueueMapImage
+
+#include custom code
+IncludeAs CustomJavaCode CLAbstractImpl20 clImplCustomCode20.java
+ManualStaticInitCall CLAbstractImpl20
+IncludeAs CustomCCode clImplCustomCode20.c
+