We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb178cb commit 47d10afCopy full SHA for 47d10af
cub/cub/grid/grid_even_share.cuh
@@ -135,8 +135,8 @@ public:
135
int avg_tiles_per_block = total_tiles / grid_size;
136
// leftover grains go to big blocks:
137
this->big_shares = total_tiles - (avg_tiles_per_block * grid_size);
138
- this->normal_share_items = avg_tiles_per_block * tile_items;
139
- this->normal_base_offset = big_shares * tile_items;
+ this->normal_share_items = static_cast<OffsetT>(avg_tiles_per_block) * tile_items;
+ this->normal_base_offset = static_cast<OffsetT>(big_shares) * tile_items;
140
this->big_share_items = normal_share_items + tile_items;
141
}
142
0 commit comments