summaryrefslogtreecommitdiffstats
path: root/resources/clImplCustomCode.java
diff options
context:
space:
mode:
Diffstat (limited to 'resources/clImplCustomCode.java')
-rw-r--r--resources/clImplCustomCode.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/resources/clImplCustomCode.java b/resources/clImplCustomCode.java
index 3c5e1f07..0d25ddb6 100644
--- a/resources/clImplCustomCode.java
+++ b/resources/clImplCustomCode.java
@@ -1,23 +1,25 @@
- public long clCreateContext(IntBuffer properties, int offset1, long[] devices, CreateContextCallback cb, Object userData, IntBuffer errcode_ret, int offset2) {
+ public long clCreateContext(IntBuffer properties, long[] devices, CreateContextCallback cb, Object userData, IntBuffer errcode_ret) {
throw new RuntimeException("not yet implemented, use clCreateContextFromType instead");
// return this.clCreateContext0(properties, offset1, devices, cb, null, errcode_ret, offset2);
}
- private native long clCreateContext0(IntBuffer cl_context_properties, int size, long[] devices, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret, int size2);
+ private native long clCreateContext0(Object cl_context_properties, int props_offset, long[] devices, CreateContextCallback pfn_notify, Object userData, Object errcode_ret, int err_offset);
-
- public long clCreateContextFromType(IntBuffer properties, int offset1, long device_type, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret, int offset2) {
+
+ public long clCreateContextFromType(IntBuffer properties, long device_type, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret) {
if(pfn_notify != null)
throw new RuntimeException("asynchronous execution with callback is not yet implemented, pass null through this method to block until complete.");
if(userData != null)
- System.out.println("WARNING: userData not yet implemented... ignoring");
+ System.err.println("WARNING: userData not yet implemented... ignoring");
- return this.clCreateContextFromType0(properties, offset1, device_type, pfn_notify, null, errcode_ret, offset2);
+ return this.clCreateContextFromType1(
+ BufferFactory.getArray(properties), BufferFactory.getIndirectBufferByteOffset(properties), device_type, pfn_notify, null,
+ BufferFactory.getArray(errcode_ret), BufferFactory.getIndirectBufferByteOffset(errcode_ret) );
}
- private native long clCreateContextFromType0(IntBuffer properties, int size, long device_type, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret, int size2);
+ private native long clCreateContextFromType1(Object properties, int props_offset, long device_type, CreateContextCallback pfn_notify, Object userData, Object errcode_ret, int err_offset);
/** Interface to C language function: <br> <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */
@@ -27,7 +29,7 @@
throw new RuntimeException("asynchronous execution with callback is not yet implemented, pass null through this method to block until complete.");
if(userData != null)
- System.out.println("WARNING: userData not yet implemented... ignoring");
+ System.err.println("WARNING: userData not yet implemented... ignoring");
int listLength = 0;
if(deviceList != null)