summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-21 01:30:44 +0100
committerMichael Bien <[email protected]>2010-02-21 01:30:44 +0100
commit252b518140b29044a71a6862df594c3374cfb442 (patch)
treec77322b055e7279a08e46f8130a440202f7bad4b
parentf386e227c0cd30bf10b90acccd77d4845dc45783 (diff)
32bit/CPU device compatibility and cleanup.
-rw-r--r--src/com/mbien/opencl/demos/fractal/MultiDeviceFractal.java2
-rw-r--r--src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java2
-rw-r--r--src/com/mbien/opencl/demos/julia3d/Julia3d.java2
-rw-r--r--src/com/mbien/opencl/demos/julia3d/structs/Camera.java16
-rw-r--r--src/com/mbien/opencl/demos/julia3d/structs/RenderingConfig.java16
-rw-r--r--src/com/mbien/opencl/demos/julia3d/structs/Vec.java16
6 files changed, 27 insertions, 27 deletions
diff --git a/src/com/mbien/opencl/demos/fractal/MultiDeviceFractal.java b/src/com/mbien/opencl/demos/fractal/MultiDeviceFractal.java
index 66c6e36..899eae9 100644
--- a/src/com/mbien/opencl/demos/fractal/MultiDeviceFractal.java
+++ b/src/com/mbien/opencl/demos/fractal/MultiDeviceFractal.java
@@ -236,7 +236,7 @@ public class MultiDeviceFractal implements GLEventListener {
gl.glBufferData(GL_PIXEL_UNPACK_BUFFER, width*height * SIZEOF_INT / slices, null, GL_STREAM_DRAW);
gl.glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
- pboBuffers[i] = clContext.createFromGLBuffer(null, pbo[i], WRITE_ONLY);
+ pboBuffers[i] = clContext.createFromGLBuffer(pbo[i], WRITE_ONLY);
}
diff --git a/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java b/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
index 8febd4c..8935e65 100644
--- a/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
+++ b/src/com/mbien/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
@@ -163,7 +163,7 @@ public class GLCLInteroperabilityDemo implements GLEventListener {
commandQueue = clContext.getMaxFlopsDevice().createCommandQueue();
- clBuffer = clContext.createFromGLBuffer(null, glObjects[VERTICES], CLGLBuffer.Mem.WRITE_ONLY);
+ clBuffer = clContext.createFromGLBuffer(glObjects[VERTICES], CLGLBuffer.Mem.WRITE_ONLY);
System.out.println("cl buffer type: " + clBuffer.getGLObjectType());
System.out.println("shared with gl buffer: " + clBuffer.getGLObjectID());
diff --git a/src/com/mbien/opencl/demos/julia3d/Julia3d.java b/src/com/mbien/opencl/demos/julia3d/Julia3d.java
index dbe2824..34156f7 100644
--- a/src/com/mbien/opencl/demos/julia3d/Julia3d.java
+++ b/src/com/mbien/opencl/demos/julia3d/Julia3d.java
@@ -45,7 +45,7 @@ public class Julia3d {
updateCamera();
//setup
- CLDevice gpu = CLPlatform.getDefault().getMaxFlopsDevice(GPU);
+ CLDevice gpu = CLPlatform.getDefault().getMaxFlopsDevice();
context = CLContext.create(gpu);
workGroupSize = 256;
diff --git a/src/com/mbien/opencl/demos/julia3d/structs/Camera.java b/src/com/mbien/opencl/demos/julia3d/structs/Camera.java
index 8b820e1..d6d647b 100644
--- a/src/com/mbien/opencl/demos/julia3d/structs/Camera.java
+++ b/src/com/mbien/opencl/demos/julia3d/structs/Camera.java
@@ -13,11 +13,11 @@ public abstract class Camera {
StructAccessor accessor;
public static int size() {
- if (CPU.is32Bit()) {
- return Camera32.size();
- } else {
+// if (CPU.is32Bit()) {
+// return Camera32.size();
+// } else {
return Camera64.size();
- }
+// }
}
public static Camera create() {
@@ -25,11 +25,11 @@ public abstract class Camera {
}
public static Camera create(java.nio.ByteBuffer buf) {
- if (CPU.is32Bit()) {
- return new Camera32(buf);
- } else {
+// if (CPU.is32Bit()) {
+// return new Camera32(buf);
+// } else {
return new Camera64(buf);
- }
+// }
}
Camera(java.nio.ByteBuffer buf) {
diff --git a/src/com/mbien/opencl/demos/julia3d/structs/RenderingConfig.java b/src/com/mbien/opencl/demos/julia3d/structs/RenderingConfig.java
index f96210f..a5b0531 100644
--- a/src/com/mbien/opencl/demos/julia3d/structs/RenderingConfig.java
+++ b/src/com/mbien/opencl/demos/julia3d/structs/RenderingConfig.java
@@ -13,11 +13,11 @@ public abstract class RenderingConfig {
StructAccessor accessor;
public static int size() {
- if (CPU.is32Bit()) {
- return RenderingConfig32.size();
- } else {
+// if (CPU.is32Bit()) {
+// return RenderingConfig32.size();
+// } else {
return RenderingConfig64.size();
- }
+// }
}
public static RenderingConfig create() {
@@ -25,11 +25,11 @@ public abstract class RenderingConfig {
}
public static RenderingConfig create(java.nio.ByteBuffer buf) {
- if (CPU.is32Bit()) {
- return new RenderingConfig32(buf);
- } else {
+// if (CPU.is32Bit()) {
+// return new RenderingConfig32(buf);
+// } else {
return new RenderingConfig64(buf);
- }
+// }
}
RenderingConfig(java.nio.ByteBuffer buf) {
diff --git a/src/com/mbien/opencl/demos/julia3d/structs/Vec.java b/src/com/mbien/opencl/demos/julia3d/structs/Vec.java
index 1344db4..9e4cf44 100644
--- a/src/com/mbien/opencl/demos/julia3d/structs/Vec.java
+++ b/src/com/mbien/opencl/demos/julia3d/structs/Vec.java
@@ -13,11 +13,11 @@ public abstract class Vec {
StructAccessor accessor;
public static int size() {
- if (CPU.is32Bit()) {
- return Vec32.size();
- } else {
+// if (CPU.is32Bit()) {
+// return Vec32.size();
+// } else {
return Vec64.size();
- }
+// }
}
public static Vec create() {
@@ -25,11 +25,11 @@ public abstract class Vec {
}
public static Vec create(java.nio.ByteBuffer buf) {
- if (CPU.is32Bit()) {
- return new Vec32(buf);
- } else {
+// if (CPU.is32Bit()) {
+// return new Vec32(buf);
+// } else {
return new Vec64(buf);
- }
+// }
}
Vec(java.nio.ByteBuffer buf) {