summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-04-01 00:38:46 +0200
committerMichael Bien <[email protected]>2010-04-01 00:38:46 +0200
commitfc0f84073394c6c06505f0c52215a72932b527c5 (patch)
tree7dafc9f55e0d24d8e28b4f96699c531ef26689f5 /src/com
parent11734980ca3a3457ed67fd054fa3041ba9b8040e (diff)
modifications due to class movement in gluegen.
Diffstat (limited to 'src/com')
-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
15 files changed, 44 insertions, 44 deletions
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