Skip to content

Commit

Permalink
fixed macro in reduce.cl to use preprocessors size for warp
Browse files Browse the repository at this point in the history
  • Loading branch information
michael boulton committed Sep 14, 2015
1 parent e82817a commit 84df834
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions mesh/mesh_kern.cl
Expand Up @@ -1914,8 +1914,8 @@ __kernel void finish_reduction_scan2_cl(

void reduction_minmax_within_tile4(__local int4 *tile)
{
const unsigned int tiX = get_local_id(0);
const unsigned int ntX = get_local_size(0);
const unsigned int tiX = get_local_id(0);
const unsigned int ntX = get_local_size(0);

for (int offset=ntX>>1; offset > MIN_REDUCE_SYNC_SIZE; offset >>= 1){
if (tiX < offset){
Expand Down Expand Up @@ -3260,8 +3260,8 @@ __kernel void set_boundary_refinement(

void reduction_sum_int2_within_tile(__local int2 *itile)
{
const unsigned int tiX = get_local_id(0);
const unsigned int ntX = get_local_size(0);
const unsigned int tiX = get_local_id(0);
const unsigned int ntX = get_local_size(0);

for (int offset = ntX >> 1; offset > MIN_REDUCE_SYNC_SIZE; offset >>= 1)
{
Expand Down
2 changes: 1 addition & 1 deletion mesh/reduce.cl
Expand Up @@ -123,7 +123,7 @@ real MIN(real a, real b)
} \
barrier(CLK_LOCAL_MEM_FENCE); \
} \
if (tiX < 32) \
if (tiX < MIN_REDUCE_SYNC_SIZE) \
{ \
for (int offset = MIN_REDUCE_SYNC_SIZE; offset > 1; offset >>= 1) \
{ \
Expand Down

0 comments on commit 84df834

Please sign in to comment.