From 22a3c40cefd6f8719afecc9b74027afe41b9dc9e Mon Sep 17 00:00:00 2001 From: Gary Frost <frost.gary@gmail.com> Date: Fri, 5 Jul 2013 21:37:14 +0000 Subject: [PATCH] Added toString patch fixing issue #121 --- com.amd.aparapi/src/java/com/amd/aparapi/Range.java | 8 ++++---- .../src/java/com/amd/aparapi/device/OpenCLDevice.java | 2 +- .../com/amd/aparapi/sample/extension/SquareExample.java | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/com.amd.aparapi/src/java/com/amd/aparapi/Range.java b/com.amd.aparapi/src/java/com/amd/aparapi/Range.java index 06fd2c63..5fb435a4 100644 --- a/com.amd.aparapi/src/java/com/amd/aparapi/Range.java +++ b/com.amd.aparapi/src/java/com/amd/aparapi/Range.java @@ -274,10 +274,10 @@ public class Range extends RangeJNI{ * Note that for this range to be valid <code>_globalWidth > 0 && _globalHeight >0 _globalDepth >0 && _localWidth>0 && _localHeight>0 && _localDepth>0 && _localWidth*_localHeight*_localDepth < MAX_GROUP_SIZE && _globalWidth%_localWidth==0 && _globalHeight%_localHeight==0 && _globalDepth%_localDepth==0</code>. * * @param _globalWidth the width of the 3D grid we wish to process - * @param _globalHieght the height of the 3D grid we wish to process + * @param _globalHeight the height of the 3D grid we wish to process * @param _globalDepth the depth of the 3D grid we wish to process * @param _localWidth the width of the 3D group we wish to process - * @param _localHieght the height of the 3D group we wish to process + * @param _localHeight the height of the 3D group we wish to process * @param _localDepth the depth of the 3D group we wish to process * @return */ @@ -407,8 +407,8 @@ public class Range extends RangeJNI{ + localSize_0 + "x" + localSize_1 + ")"); break; case 3: - sb.append("3D(global:" + globalSize_0 + "x" + globalSize_1 + "x" + globalSize_2 + " local:" - + (localIsDerived ? "(derived)" : "") + localSize_0 + "x" + localSize_1 + "x" + localSize_0 + ")"); + sb.append("3D(global:" + globalSize_0 + "x" + globalSize_1 + "x" + globalSize_2 + " local:" + + (localIsDerived ? "(derived)" : "") + localSize_0 + "x" + localSize_1 + "x" + localSize_2 + ")"); break; } diff --git a/com.amd.aparapi/src/java/com/amd/aparapi/device/OpenCLDevice.java b/com.amd.aparapi/src/java/com/amd/aparapi/device/OpenCLDevice.java index ec9bed2f..9793d4c7 100644 --- a/com.amd.aparapi/src/java/com/amd/aparapi/device/OpenCLDevice.java +++ b/com.amd.aparapi/src/java/com/amd/aparapi/device/OpenCLDevice.java @@ -171,7 +171,7 @@ public class OpenCLDevice extends Device{ } else if (method.getName().equals("begin")) { System.out.println("begin not implemented"); } else if (method.getName().equals("dispose")) { - System.out.println("dispose"); + // System.out.println("dispose"); for (OpenCLKernel k:map.values()){ k.dispose(); } diff --git a/samples/extension/src/com/amd/aparapi/sample/extension/SquareExample.java b/samples/extension/src/com/amd/aparapi/sample/extension/SquareExample.java index 23fc9b86..b954226e 100644 --- a/samples/extension/src/com/amd/aparapi/sample/extension/SquareExample.java +++ b/samples/extension/src/com/amd/aparapi/sample/extension/SquareExample.java @@ -66,11 +66,11 @@ public class SquareExample{ System.out.println(l+" "+in[i] + " " + squares[i]); } - // squarer.square(range, squares, quads); + squarer.square(range, squares, quads); - // for (int i = 0; i < size; i++) { - // System.out.println(l+" "+ in[i] + " " + squares[i] + " " + quads[i]); - //} + for (int i = 0; i < size; i++) { + System.out.println(l+" "+ in[i] + " " + squares[i] + " " + quads[i]); + } squarer.dispose(); } -- GitLab