Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions rocprim/include/rocprim/block/detail/block_histogram_sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,10 @@ class block_histogram_sort
::rocprim::syncthreads(); // Fix race condition that appeared on Vega10 hardware, storage LDS is reused below.

ROCPRIM_UNROLL
for(unsigned int offset = 0; offset < Bins; offset += BlockSize)
for(unsigned int offset = 0; offset + flat_tid < Bins; offset += BlockSize)
{
const unsigned int offset_tid = offset + flat_tid;
if(offset_tid < Bins)
{
storage_.start[offset_tid] = tile_size;
storage_.end[offset_tid] = tile_size;
}
storage_.start[offset + flat_tid] = tile_size;
storage_.end[offset + flat_tid] = tile_size;
}
::rocprim::syncthreads();

Expand Down