From 252b518140b29044a71a6862df594c3374cfb442 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 21 Feb 2010 01:30:44 +0100 Subject: 32bit/CPU device compatibility and cleanup. --- src/com/mbien/opencl/demos/julia3d/Julia3d.java | 2 +- src/com/mbien/opencl/demos/julia3d/structs/Camera.java | 16 ++++++++-------- .../opencl/demos/julia3d/structs/RenderingConfig.java | 16 ++++++++-------- src/com/mbien/opencl/demos/julia3d/structs/Vec.java | 16 ++++++++-------- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'src/com/mbien/opencl/demos/julia3d') 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) { -- cgit v1.2.3