summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/util/pp/Reduction.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-09-21 06:25:20 +0200
committerMichael Bien <[email protected]>2011-09-21 06:25:20 +0200
commitbaf07b12a2a62003334d17113e8dad1e92b80029 (patch)
tree7f1d345ed624bd38d909402051383cc1f43148b9 /src/com/jogamp/opencl/util/pp/Reduction.java
parentccfc0b128c0eeee54ded44fc3700de54e9532213 (diff)
bugfixes for parallel reduction primitive
- wrong cache size - illegal read from cache on overflow -> read from gloabal mem
Diffstat (limited to 'src/com/jogamp/opencl/util/pp/Reduction.java')
-rw-r--r--src/com/jogamp/opencl/util/pp/Reduction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/util/pp/Reduction.java b/src/com/jogamp/opencl/util/pp/Reduction.java
index c2d47f7c..77a37e78 100644
--- a/src/com/jogamp/opencl/util/pp/Reduction.java
+++ b/src/com/jogamp/opencl/util/pp/Reduction.java
@@ -122,7 +122,7 @@ public class Reduction<B extends Buffer> implements CLResource {
int workItems = CLUtil.roundUp(realSize, groupSize*2) / 2;
int groups = workItems / groupSize;
- int sharedBufferSize = groupSize / 2 * ELEMENT.SIZE*VECTOR_SIZE;
+ int sharedBufferSize = groupSize * ELEMENT.SIZE*VECTOR_SIZE;
int outputSize = groups * ELEMENT.SIZE*VECTOR_SIZE;