diff options
author | Michael Bien <[email protected]> | 2010-09-18 04:58:43 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-09-18 04:58:43 +0200 |
commit | 67129fcd16ec590d7c67088ad1b39cc8251105fb (patch) | |
tree | 265d6a1b428e4ffff6b57419d2a07a88b5c393f8 /src/com/jogamp/opencl/CLCommandQueue.java | |
parent | 91938387529fe220323e0c7472f788c78e1ace72 (diff) |
fixed exception message in NDRange Kernel method.
Diffstat (limited to 'src/com/jogamp/opencl/CLCommandQueue.java')
-rw-r--r-- | src/com/jogamp/opencl/CLCommandQueue.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java index 0a504809..1315aef5 100644 --- a/src/com/jogamp/opencl/CLCommandQueue.java +++ b/src/com/jogamp/opencl/CLCommandQueue.java @@ -1514,11 +1514,11 @@ public class CLCommandQueue extends CLObject implements CLResource { events==null ? null : events.IDs); if(ret != CL_SUCCESS) { - throw newException(ret, "can not enqueue "+workDimension+"DRangeKernel: " + kernel+ "\n" - + " with gwo: " + toStr(globalWorkOffset, workDimension) - + " gws: " + toStr(globalWorkSize, workDimension) - + " lws: " + toStr(localWorkSize, workDimension) - + toStr(condition, events)); + throw newException(ret, "can not enqueue "+workDimension+"DRange " + kernel+ "\n" + + " with gwo: " + toStr(globalWorkOffset) + + " gws: " + toStr(globalWorkSize) + + " lws: " + toStr(localWorkSize) + + " " + toStr(condition, events)); } if(events != null) { @@ -1663,7 +1663,7 @@ public class CLCommandQueue extends CLObject implements CLResource { } private static PointerBuffer copy2NIO(PointerBuffer buffer, long a) { - return (PointerBuffer) buffer.put(0, a); + return (PointerBuffer) buffer.put(2, a).position(2); } // private static PointerBuffer copy2NIO(PointerBuffer buffer, long a, long b) { @@ -1682,15 +1682,15 @@ public class CLCommandQueue extends CLObject implements CLResource { return (PointerBuffer) ((PointerBuffer)buffer.rewind()).put(a).put(b).put(c).rewind(); } - private static String toStr(PointerBuffer buffer, int length) { + private static String toStr(PointerBuffer buffer) { if(buffer == null) { return null; } StringBuilder sb = new StringBuilder(); sb.append('{'); - for (int i = buffer.position(); i < length; i++) { + for (int i = buffer.position(); i < buffer.capacity(); i++) { sb.append(buffer.get(i)); - if(i != length-1) { + if(i != buffer.capacity()-1) { sb.append(", "); } } |