Skip to content

Commit

Permalink
moar noexcepts...
Browse files Browse the repository at this point in the history
  • Loading branch information
Xarthisius authored and neutrinoceros committed Jul 27, 2023
1 parent a4e410d commit 7360d9e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions yt/utilities/lib/fixed_interpolator.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ cimport numpy as np

cdef extern from "fixed_interpolator.hpp":
np.float64_t fast_interpolate(int ds[3], int ci[3], np.float64_t dp[3],
np.float64_t *data) nogil
np.float64_t *data) noexcept nogil
np.float64_t offset_interpolate(int ds[3], np.float64_t dp[3],
np.float64_t *data) nogil
np.float64_t *data) noexcept nogil
np.float64_t trilinear_interpolate(int ds[3], int ci[3], np.float64_t dp[3],
np.float64_t *data) nogil
np.float64_t *data) noexcept nogil
void eval_gradient(int ds[3], np.float64_t dp[3], np.float64_t *data,
np.float64_t grad[3]) nogil
void offset_fill(int *ds, np.float64_t *data, np.float64_t *gridval) nogil
np.float64_t grad[3]) noexcept nogil
void offset_fill(int *ds, np.float64_t *data, np.float64_t *gridval) noexcept nogil
void vertex_interp(np.float64_t v1, np.float64_t v2, np.float64_t isovalue,
np.float64_t vl[3], np.float64_t dds[3],
np.float64_t x, np.float64_t y, np.float64_t z,
int vind1, int vind2) nogil
int vind1, int vind2) noexcept nogil
2 changes: 1 addition & 1 deletion yt/utilities/lib/image_samplers.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ctypedef int calculate_extent_function(ImageSampler image,
ctypedef void generate_vector_info_function(ImageSampler im,
np.int64_t vi, np.int64_t vj,
np.float64_t width[2],
np.float64_t v_dir[3], np.float64_t v_pos[3]) nogil
np.float64_t v_dir[3], np.float64_t v_pos[3]) noexcept nogil

cdef struct ImageAccumulator:
np.float64_t rgba[Nch]
Expand Down
4 changes: 2 additions & 2 deletions yt/utilities/lib/lenses.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ cdef void generate_vector_info_plane_parallel(ImageSampler im,
np.int64_t vi, np.int64_t vj,
np.float64_t width[2],
# Now outbound
np.float64_t v_dir[3], np.float64_t v_pos[3]) nogil:
np.float64_t v_dir[3], np.float64_t v_pos[3]) noexcept nogil:
cdef int i
cdef np.float64_t px, py
px = width[0] * (<np.float64_t>vi)/(<np.float64_t>im.nv[0]-1) - width[0]/2.0
Expand All @@ -197,7 +197,7 @@ cdef void generate_vector_info_null(ImageSampler im,
np.int64_t vi, np.int64_t vj,
np.float64_t width[2],
# Now outbound
np.float64_t v_dir[3], np.float64_t v_pos[3]) nogil:
np.float64_t v_dir[3], np.float64_t v_pos[3]) noexcept nogil:
cdef int i
for i in range(3):
# Here's a funny thing: we use vi here because our *image* will be
Expand Down

0 comments on commit 7360d9e

Please sign in to comment.