Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Simplify local memory usage

  • Loading branch information...
commit 1053f707d3723cd1a5a1e5bdd77bd27b65024720 1 parent ec431a2
@Oblomov authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 reduction_kernels.ocl
View
7 reduction_kernels.ocl
@@ -38,12 +38,11 @@ __kernel void reduce(__global const TYPE* restrict input,
#endif
if (lid < offset) {
TYPE other = scratch[lid+offset];
- TYPE me = scratch[lid];
- OP(me, other);
- scratch[lid] = me;
+ OP(acc, other);
+ scratch[lid] = acc;
}
}
if (lid == 0)
- output[get_group_id(0)] = scratch[0];
+ output[get_group_id(0)] = acc;
}
Please sign in to comment.
Something went wrong with that request. Please try again.