We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4df9541 commit f729cc1Copy full SHA for f729cc1
1 file changed
src/cuda/force_spatial_hash.cu
@@ -245,8 +245,7 @@ void SpatialHashGrid::build(const ParticleData* d_particles) {
245
grid_dims_.z = static_cast<int>(ceilf((bbox_max_.z - bbox_min_.z) / cell_size_)) + 1;
246
247
// Use int64_t to prevent integer overflow for large grids
248
- int64_t new_total_cells =
249
- static_cast<int64_t>(grid_dims_.x) * grid_dims_.y * grid_dims_.z;
+ int64_t new_total_cells = static_cast<int64_t>(grid_dims_.x) * grid_dims_.y * grid_dims_.z;
250
251
// Sanity check: limit total cells to prevent memory exhaustion
252
if (new_total_cells > 100000000) { // 100 million cells max
0 commit comments