Skip to content

Commit f05e23a

Browse files
committed
another war for comparison of uint with zero if dipt is 1
1 parent 0417e3e commit f05e23a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cub/cub/block/block_run_length_decode.cuh

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public:
384384
item_offsets[i] = thread_decoded_offset - assigned_run_begin;
385385

386386
// A thread only needs to fetch the next run if this was not the last loop iteration
387-
const bool is_final_loop_iteration = i >= DECODED_ITEMS_PER_THREAD - 1;
387+
const bool is_final_loop_iteration = (i + 1 >= DECODED_ITEMS_PER_THREAD);
388388
if (!is_final_loop_iteration && (thread_decoded_offset == assigned_run_end - 1))
389389
{
390390
// We make sure that a thread is not re-entering this conditional when being assigned to the last run already by

0 commit comments

Comments
 (0)