boids: use div_ceil to calculate work group count (#8506)

This commit is contained in:
mfluehr 2025-11-10 12:56:04 -06:00 committed by GitHub
parent f14458b067
commit 0290f085b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -226,8 +226,7 @@ impl crate::framework::Example for Example {
}
// calculates number of work groups from PARTICLES_PER_GROUP constant
let work_group_count =
((NUM_PARTICLES as f32) / (PARTICLES_PER_GROUP as f32)).ceil() as u32;
let work_group_count = NUM_PARTICLES.div_ceil(PARTICLES_PER_GROUP);
// returns Example struct and No encoder commands