Commit 2541812e authored by Adam Osewski's avatar Adam Osewski
Browse files

Use different active wait scheme.

parent cfbef574
...@@ -105,15 +105,11 @@ class StridedReductionTileLoop ...@@ -105,15 +105,11 @@ class StridedReductionTileLoop
if(neighbour_count > 0) if(neighbour_count > 0)
{ {
index_t flag_sum = 0; // Check if this workgroup's flag is also set (i = 0)
do for(index_t i = 0; i <= neighbour_count; ++i)
{ {
flag_sum = 0; finished_block_flags_.wait_eq(GetWorkgroupFlagIdx() + i, 1);
for(index_t i = 1; i <= neighbour_count; ++i) }
{
flag_sum += finished_block_flags_.ld(GetWorkgroupFlagIdx() + i);
}
} while(flag_sum != neighbour_count);
} }
return neighbour_count; return neighbour_count;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment