summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--resources/cl-if.cfg6
-rw-r--r--resources/clImplCustomCode.java6
-rw-r--r--src/com/mbien/opencl/CLCommandQueue.java28
-rw-r--r--src/com/mbien/opencl/CLContext.java10
-rw-r--r--src/com/mbien/opencl/CLDevice.java4
-rw-r--r--src/com/mbien/opencl/CLEvent.java2
-rw-r--r--src/com/mbien/opencl/CLEventList.java2
-rw-r--r--src/com/mbien/opencl/CLImage.java2
-rw-r--r--src/com/mbien/opencl/CLImage2d.java2
-rw-r--r--src/com/mbien/opencl/CLImage3d.java2
-rw-r--r--src/com/mbien/opencl/CLInfoAccessor.java4
-rw-r--r--src/com/mbien/opencl/CLKernel.java6
-rw-r--r--src/com/mbien/opencl/CLMemory.java4
-rw-r--r--src/com/mbien/opencl/CLPlatform.java4
-rw-r--r--src/com/mbien/opencl/CLProgram.java10
-rw-r--r--src/com/mbien/opencl/CLSampler.java4
-rw-r--r--src/com/mbien/opencl/gl/CLGLContext.java4
-rw-r--r--test/com/mbien/opencl/CLBufferTest.java4
-rw-r--r--test/com/mbien/opencl/CLCommandQueueTest.java2
-rw-r--r--test/com/mbien/opencl/HighLevelBindingTest.java2
-rw-r--r--test/com/mbien/opencl/LowLevelBindingTest.java4
21 files changed, 56 insertions, 56 deletions
diff --git a/resources/cl-if.cfg b/resources/cl-if.cfg
index 47761b38..48a87a58 100644
--- a/resources/cl-if.cfg
+++ b/resources/cl-if.cfg
@@ -20,17 +20,17 @@ Ignore CL_GL_.*|cl.*GL.*
Ignore clCreateContext
CustomJavaCode CL
CustomJavaCode CL /** Interface to C language function: <br> <code> cl_context {@native clCreateContext}(intptr_t * , uint32_t, cl_device_id * , void (*pfn_notify)(const char *, const void *, size_t, void *), void *, int32_t * ); </code> */
-CustomJavaCode CL public long clCreateContext(com.jogamp.gluegen.runtime.PointerBuffer properties, com.jogamp.gluegen.runtime.PointerBuffer devices, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret);
+CustomJavaCode CL public long clCreateContext(PointerBuffer properties, PointerBuffer devices, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret);
Ignore clCreateContextFromType
CustomJavaCode CL
CustomJavaCode CL /** Interface to C language function: <br> <code> cl_context {@native clCreateContextFromType}(cl_context_properties *properties, cl_device_type device_type, void (*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, void *user_data), void *user_data, cl_int *errcode_ret) ; </code> */
-CustomJavaCode CL public long clCreateContextFromType(com.jogamp.gluegen.runtime.PointerBuffer properties, long device_type, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret);
+CustomJavaCode CL public long clCreateContextFromType(PointerBuffer properties, long device_type, CreateContextCallback pfn_notify, Object userData, IntBuffer errcode_ret);
Ignore clBuildProgram
CustomJavaCode CL
CustomJavaCode CL /** Interface to C language function: <br> <code> int32_t {@native clBuildProgram}(cl_program, uint32_t, cl_device_id * , const char * , void (*pfn_notify)(cl_program, void *user_data), void * ); </code> */
-CustomJavaCode CL public int clBuildProgram(long program, int deviceCount, com.jogamp.gluegen.runtime.PointerBuffer devices, String options, BuildProgramCallback cb, Object userData);
+CustomJavaCode CL public int clBuildProgram(long program, int deviceCount, PointerBuffer devices, String options, BuildProgramCallback cb, Object userData);
Ignore clEnqueueNativeKernel
#TODO..
diff --git a/resources/clImplCustomCode.java b/resources/clImplCustomCode.java
index 7ee540d1..3048a6ad 100644
--- a/resources/clImplCustomCode.java
+++ b/resources/clImplCustomCode.java
@@ -73,10 +73,10 @@
@param event a direct {@link com.jogamp.gluegen.runtime.PointerBuffer}
@param errcode_ret a direct {@link java.nio.IntBuffer} */
public java.nio.ByteBuffer clEnqueueMapImage(long command_queue, long image, int blocking_map, long map_flags,
- com.jogamp.gluegen.runtime.Int64Buffer origin, com.jogamp.gluegen.runtime.Int64Buffer range,
- com.jogamp.gluegen.runtime.Int64Buffer image_row_pitch, com.jogamp.gluegen.runtime.Int64Buffer image_slice_pitch,
+ Int64Buffer origin, Int64Buffer range,
+ Int64Buffer image_row_pitch, Int64Buffer image_slice_pitch,
int num_events_in_wait_list,
- com.jogamp.gluegen.runtime.PointerBuffer event_wait_list, com.jogamp.gluegen.runtime.PointerBuffer event, java.nio.IntBuffer errcode_ret) {
+ PointerBuffer event_wait_list, PointerBuffer event, java.nio.IntBuffer errcode_ret) {
if (!Buffers.isDirect(origin))
throw new CLException("Argument \"origin\" was not a direct buffer");
diff --git a/src/com/mbien/opencl/CLCommandQueue.java b/src/com/mbien/opencl/CLCommandQueue.java
index 66b0d392..cbdba9b8 100644
--- a/src/com/mbien/opencl/CLCommandQueue.java
+++ b/src/com/mbien/opencl/CLCommandQueue.java
@@ -1,15 +1,15 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Int64Buffer;
import com.mbien.opencl.gl.CLGLI;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
import static com.mbien.opencl.CLException.*;
import static com.mbien.opencl.CL.*;
import static com.mbien.opencl.util.CLUtil.*;
@@ -1360,27 +1360,27 @@ public class CLCommandQueue extends CLObject implements CLResource {
}
private static PointerBuffer copy2NIO(PointerBuffer buffer, long a) {
- return buffer.put(2, a).position(2);
+ return (PointerBuffer) buffer.put(2, a).position(2);
}
- private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) {
- return buffer.position(1).put(a).put(b).position(1);
- }
-
- private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b, long c) {
- return buffer.rewind().put(a).put(b).put(c).rewind();
- }
+// private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) {
+// return buffer.position(1).put(a).put(b).position(1);
+// }
+//
+// private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b, long c) {
+// return buffer.rewind().put(a).put(b).put(c).rewind();
+// }
private static Int64Buffer copy2NIO(Int64Buffer buffer, long a) {
- return buffer.put(2, a).position(2);
+ return (Int64Buffer) buffer.put(2, a).position(2);
}
private static Int64Buffer copy2NIO(Int64Buffer buffer, long a, long b) {
- return buffer.position(1).put(a).put(b).position(1);
+ return (Int64Buffer) ((Int64Buffer)buffer.position(1)).put(a).put(b).position(1);
}
private static Int64Buffer copy2NIO(Int64Buffer buffer, long a, long b, long c) {
- return buffer.rewind().put(a).put(b).put(c).rewind();
+ return (Int64Buffer) ((Int64Buffer)buffer.rewind()).put(a).put(b).put(c).rewind();
}
/**
diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java
index da3899ec..3e6a72ed 100644
--- a/src/com/mbien/opencl/CLContext.java
+++ b/src/com/mbien/opencl/CLContext.java
@@ -4,8 +4,8 @@ import com.mbien.opencl.CLDevice.Type;
import com.mbien.opencl.CLMemory.Mem;
import com.mbien.opencl.CLSampler.AddressingMode;
import com.mbien.opencl.CLSampler.FilteringMode;
-import com.jogamp.gluegen.runtime.Int64Buffer;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Int64Buffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -25,8 +25,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.mbien.opencl.CLException.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
-import static com.jogamp.gluegen.runtime.Platform.*;
+import static com.jogamp.common.nio.Buffers.*;
+import static com.jogamp.common.os.Platform.*;
/**
* CLContext is responsible for managing objects such as command-queues, memory,
@@ -176,7 +176,7 @@ public class CLContext extends CLObject implements CLResource {
throw new RuntimeException("no OpenCL installation found");
}
- return PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
+ return (PointerBuffer)PointerBuffer.allocateDirect(3).put(CL.CL_CONTEXT_PLATFORM)
.put(platform.ID).put(0) // 0 terminated array
.rewind();
}
diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java
index 3436a726..a85b2eb9 100644
--- a/src/com/mbien/opencl/CLDevice.java
+++ b/src/com/mbien/opencl/CLDevice.java
@@ -1,8 +1,8 @@
package com.mbien.opencl;
import com.mbien.opencl.util.CLUtil;
-import com.jogamp.gluegen.runtime.Int64Buffer;
-import com.jogamp.gluegen.runtime.Platform;
+import com.jogamp.common.nio.Int64Buffer;
+import com.jogamp.common.os.Platform;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.ArrayList;
diff --git a/src/com/mbien/opencl/CLEvent.java b/src/com/mbien/opencl/CLEvent.java
index e7221ee0..bbcf74cb 100644
--- a/src/com/mbien/opencl/CLEvent.java
+++ b/src/com/mbien/opencl/CLEvent.java
@@ -1,6 +1,6 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Int64Buffer;
import java.nio.Buffer;
import static com.mbien.opencl.CL.*;
diff --git a/src/com/mbien/opencl/CLEventList.java b/src/com/mbien/opencl/CLEventList.java
index 27cbaaf5..928ce9bf 100644
--- a/src/com/mbien/opencl/CLEventList.java
+++ b/src/com/mbien/opencl/CLEventList.java
@@ -1,6 +1,6 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.util.Iterator;
/**
diff --git a/src/com/mbien/opencl/CLImage.java b/src/com/mbien/opencl/CLImage.java
index 5a6ebb41..2e201b4a 100644
--- a/src/com/mbien/opencl/CLImage.java
+++ b/src/com/mbien/opencl/CLImage.java
@@ -1,6 +1,6 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Int64Buffer;
import java.nio.Buffer;
import static com.mbien.opencl.CL.*;
diff --git a/src/com/mbien/opencl/CLImage2d.java b/src/com/mbien/opencl/CLImage2d.java
index 2c7a3a87..c0d18dd3 100644
--- a/src/com/mbien/opencl/CLImage2d.java
+++ b/src/com/mbien/opencl/CLImage2d.java
@@ -1,6 +1,6 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import java.nio.Buffer;
import java.nio.IntBuffer;
diff --git a/src/com/mbien/opencl/CLImage3d.java b/src/com/mbien/opencl/CLImage3d.java
index 30db943f..6a01ffcc 100644
--- a/src/com/mbien/opencl/CLImage3d.java
+++ b/src/com/mbien/opencl/CLImage3d.java
@@ -1,6 +1,6 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import java.nio.Buffer;
import java.nio.IntBuffer;
diff --git a/src/com/mbien/opencl/CLInfoAccessor.java b/src/com/mbien/opencl/CLInfoAccessor.java
index ea69db33..9f2ae1aa 100644
--- a/src/com/mbien/opencl/CLInfoAccessor.java
+++ b/src/com/mbien/opencl/CLInfoAccessor.java
@@ -1,7 +1,7 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.Int64Buffer;
import com.mbien.opencl.util.CLUtil;
import java.nio.Buffer;
import java.nio.ByteBuffer;
diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java
index 31315531..a66e082c 100644
--- a/src/com/mbien/opencl/CLKernel.java
+++ b/src/com/mbien/opencl/CLKernel.java
@@ -1,9 +1,9 @@
package com.mbien.opencl;
import com.mbien.opencl.util.CLUtil;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.Platform;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.nio.Int64Buffer;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
diff --git a/src/com/mbien/opencl/CLMemory.java b/src/com/mbien/opencl/CLMemory.java
index ad423e73..3c3b1531 100644
--- a/src/com/mbien/opencl/CLMemory.java
+++ b/src/com/mbien/opencl/CLMemory.java
@@ -1,8 +1,8 @@
package com.mbien.opencl;
import com.mbien.opencl.gl.CLGLI;
-import com.jogamp.gluegen.runtime.Buffers;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Buffers;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java
index b6b502b9..545ca9f6 100644
--- a/src/com/mbien/opencl/CLPlatform.java
+++ b/src/com/mbien/opencl/CLPlatform.java
@@ -1,9 +1,9 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Int64Buffer;
+import com.jogamp.common.nio.Int64Buffer;
import com.mbien.opencl.util.CLUtil;
import com.mbien.opencl.impl.CLImpl;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
diff --git a/src/com/mbien/opencl/CLProgram.java b/src/com/mbien/opencl/CLProgram.java
index 1895df12..db0b7304 100644
--- a/src/com/mbien/opencl/CLProgram.java
+++ b/src/com/mbien/opencl/CLProgram.java
@@ -2,9 +2,9 @@ package com.mbien.opencl;
import com.mbien.opencl.util.CLProgramConfiguration;
import com.mbien.opencl.util.CLUtil;
-import com.jogamp.gluegen.runtime.Int64Buffer;
-import com.jogamp.gluegen.runtime.Platform;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Int64Buffer;
+import com.jogamp.common.os.Platform;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.ByteBuffer;
import java.nio.IntBuffer;
import java.util.Collections;
@@ -16,7 +16,7 @@ import java.util.Map;
import static com.mbien.opencl.CLException.*;
import static com.mbien.opencl.CL.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
/**
* Represents a OpenCL program executed on one or more {@link CLDevice}s.
@@ -46,7 +46,7 @@ public class CLProgram extends CLObject implements CLResource {
IntBuffer status = newDirectByteBuffer(4).asIntBuffer();
// Create the program
long id = context.cl.clCreateProgramWithSource(context.ID, 1, new String[] {src},
- Int64Buffer.allocateDirect(1).put(src.length()), status);
+ (Int64Buffer)Int64Buffer.allocateDirect(1).put(src.length()), status);
checkForError(status.get(), "can not create program with source");
diff --git a/src/com/mbien/opencl/CLSampler.java b/src/com/mbien/opencl/CLSampler.java
index f5c74f6e..397639c9 100644
--- a/src/com/mbien/opencl/CLSampler.java
+++ b/src/com/mbien/opencl/CLSampler.java
@@ -1,7 +1,7 @@
package com.mbien.opencl;
-import com.jogamp.gluegen.runtime.Int64Buffer;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.Int64Buffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.Buffer;
import static com.mbien.opencl.CLException.*;
diff --git a/src/com/mbien/opencl/gl/CLGLContext.java b/src/com/mbien/opencl/gl/CLGLContext.java
index 7aceccda..db9d6150 100644
--- a/src/com/mbien/opencl/gl/CLGLContext.java
+++ b/src/com/mbien/opencl/gl/CLGLContext.java
@@ -5,7 +5,7 @@ import com.mbien.opencl.CLDevice;
import java.nio.Buffer;
import com.mbien.opencl.CLMemory.Mem;
import com.mbien.opencl.CLPlatform;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opengl.impl.GLContextImpl;
import com.jogamp.opengl.impl.macosx.cgl.MacOSXCGLContext;
import com.jogamp.opengl.impl.windows.wgl.WindowsWGLContext;
@@ -148,7 +148,7 @@ public final class CLGLContext extends CLContext {
throw new RuntimeException("unsupported GLContext: "+glContext);
}
- return properties.put(0).rewind(); // 0 terminated array
+ return (PointerBuffer)properties.put(0).rewind(); // 0 terminated array
}
// Buffers
diff --git a/test/com/mbien/opencl/CLBufferTest.java b/test/com/mbien/opencl/CLBufferTest.java
index c62e17c8..a99db23c 100644
--- a/test/com/mbien/opencl/CLBufferTest.java
+++ b/test/com/mbien/opencl/CLBufferTest.java
@@ -2,14 +2,14 @@ package com.mbien.opencl;
import com.mbien.opencl.CLMemory.Mem;
import com.mbien.opencl.CLMemory.Map;
-import com.jogamp.gluegen.runtime.Buffers;
+import com.jogamp.common.nio.Buffers;
import java.nio.ByteBuffer;
import org.junit.Test;
import static org.junit.Assert.*;
import static java.lang.System.*;
import static com.mbien.opencl.TestUtils.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
/**
*
diff --git a/test/com/mbien/opencl/CLCommandQueueTest.java b/test/com/mbien/opencl/CLCommandQueueTest.java
index 2685182a..cbfc2f3c 100644
--- a/test/com/mbien/opencl/CLCommandQueueTest.java
+++ b/test/com/mbien/opencl/CLCommandQueueTest.java
@@ -12,7 +12,7 @@ import static org.junit.Assert.*;
import static java.lang.System.*;
import static com.mbien.opencl.TestUtils.*;
import static com.mbien.opencl.CLEvent.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
/**
*
diff --git a/test/com/mbien/opencl/HighLevelBindingTest.java b/test/com/mbien/opencl/HighLevelBindingTest.java
index 264b6af2..07788f6c 100644
--- a/test/com/mbien/opencl/HighLevelBindingTest.java
+++ b/test/com/mbien/opencl/HighLevelBindingTest.java
@@ -22,7 +22,7 @@ import org.junit.Test;
import static org.junit.Assert.*;
import static java.lang.System.*;
import static com.mbien.opencl.TestUtils.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
/**
* Test testing the high level bindings.
diff --git a/test/com/mbien/opencl/LowLevelBindingTest.java b/test/com/mbien/opencl/LowLevelBindingTest.java
index 481d8450..1a57bec5 100644
--- a/test/com/mbien/opencl/LowLevelBindingTest.java
+++ b/test/com/mbien/opencl/LowLevelBindingTest.java
@@ -1,7 +1,7 @@
package com.mbien.opencl;
import com.mbien.opencl.impl.CLImpl;
-import com.jogamp.gluegen.runtime.PointerBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
@@ -12,7 +12,7 @@ import static org.junit.Assert.*;
import static java.lang.System.*;
import static com.mbien.opencl.TestUtils.*;
import static com.mbien.opencl.util.CLUtil.*;
-import static com.jogamp.gluegen.runtime.Buffers.*;
+import static com.jogamp.common.nio.Buffers.*;
/**
* Test testing the low level bindings.