Skip to content

Commit

Permalink
fixed strided iteration set potentially too large
Browse files Browse the repository at this point in the history
  • Loading branch information
will-saunders-ukaea committed Nov 21, 2024
1 parent de61a2e commit 80e6f4b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class ParticleLoopBlockIterationSet {
const std::size_t max_num_blocks_per_workgroup =
(num_bytes_local == 0) ? local_size
: local_mem_size / num_bytes_per_block;
local_size = get_prev_power_of_two(max_num_blocks_per_workgroup);
local_size = std::min(get_prev_power_of_two(max_num_blocks_per_workgroup), local_size);
NESOASSERT(local_size * stride * num_bytes_local <= local_mem_size,
"Failure to determine a local size for iteration set.");
return local_size;
Expand Down

0 comments on commit 80e6f4b

Please sign in to comment.