Skip to content

Commit

Permalink
#304 fix redundant bug in LaunchConfig::for_num_elems (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman authored Jan 8, 2025
1 parent e2116f3 commit 89d3ce8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/driver/safe/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl LaunchConfig {
/// - shared_mem_bytes == `0`
pub fn for_num_elems(n: u32) -> Self {
const NUM_THREADS: u32 = 1024;
let num_blocks = (n + NUM_THREADS - 1).div_ceil(NUM_THREADS);
let num_blocks = n.div_ceil(NUM_THREADS);
Self {
grid_dim: (num_blocks, 1, 1),
block_dim: (NUM_THREADS, 1, 1),
Expand Down

0 comments on commit 89d3ce8

Please sign in to comment.