diff --git a/yt/utilities/lib/pixelization_routines.pyx b/yt/utilities/lib/pixelization_routines.pyx index 147064c28e4..e5e36c4a835 100644 --- a/yt/utilities/lib/pixelization_routines.pyx +++ b/yt/utilities/lib/pixelization_routines.pyx @@ -1026,13 +1026,14 @@ def pixelize_sph_kernel_projection( ih_j2 = 1.0/h_j2 prefactor_j = pmass[j] / pdens[j] / hsml[j]**2 + if weight_field is None: prefactor_j *= quantity_to_smooth[j] else: prefactor_j *= quantity_to_smooth[j] * _weight_field[j] # found pixels we deposit on, loop through those pixels - for xi in range(x0, x1): + for xi in prange(x0, x1, schedule="static"): # we use the centre of the pixel to calculate contribution x = (xi + 0.5) * dx + x_min @@ -1056,6 +1057,7 @@ def pixelize_sph_kernel_projection( # now we just use the kernel projection buff[xi, yi] += prefactor_j * itab.interpolate(q_ij2) + @cython.boundscheck(False) @cython.wraparound(False) def interpolate_sph_positions_gather(np.float64_t[:] buff, @@ -1279,7 +1281,7 @@ def pixelize_sph_kernel_slice( # Now we know which pixels to deposit onto for this particle, # so loop over them and add this particle's contribution - for xi in range(x0, x1): + for xi in prange(x0, x1, schedule="static"): x = (xi + 0.5) * dx + x_min posx_diff = posx[j] - x @@ -1371,7 +1373,7 @@ def pixelize_sph_kernel_arbitrary_grid(np.float64_t[:, :, :] buff, # Now we know which voxels to deposit onto for this particle, # so loop over them and add this particle's contribution - for xi in range(x0, x1): + for xi in range(x0, x1, schedule="static"): x = (xi + 0.5) * dx + x_min posx_diff = posx[j] - x