fix: use of noexcept
This commit is contained in:
parent
f61839c82e
commit
7e6419e0f0
@ -27,7 +27,7 @@ cdef extern from "openmp.hpp" namespace "sphereproj":
|
||||
@cython.wraparound(False)
|
||||
cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y,
|
||||
DTYPE_t z,
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil:
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) noexcept nogil:
|
||||
|
||||
cdef int Ngrid = d.shape[0]
|
||||
cdef DTYPE_t inv_delta = Ngrid/Lbox
|
||||
@ -86,7 +86,7 @@ cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y,
|
||||
@cython.wraparound(False)
|
||||
cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y,
|
||||
DTYPE_t z,
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil:
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) noexcept nogil:
|
||||
|
||||
cdef int Ngrid = d.shape[0]
|
||||
cdef DTYPE_t inv_delta = Ngrid/Lbox
|
||||
@ -116,7 +116,7 @@ cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y,
|
||||
@cython.wraparound(False)
|
||||
cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y,
|
||||
DTYPE_t z,
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil:
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) noexcept nogil:
|
||||
|
||||
cdef int Ngrid = d.shape[0]
|
||||
cdef DTYPE_t inv_delta = Ngrid/Lbox
|
||||
@ -145,7 +145,7 @@ cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y,
|
||||
@cython.wraparound(False)
|
||||
cdef void interp3d_INTERNAL(DTYPE_t x, DTYPE_t y,
|
||||
DTYPE_t z,
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil:
|
||||
DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) noexcept nogil:
|
||||
|
||||
cdef int Ngrid = d.shape[0]
|
||||
cdef DTYPE_t inv_delta = Ngrid/Lbox
|
||||
@ -386,7 +386,7 @@ def interp2d(x not None, y not None,
|
||||
@cython.boundscheck(False)
|
||||
@cython.cdivision(True)
|
||||
cdef void INTERNAL_project_cic_no_mass(DTYPE_t[:,:,:] g,
|
||||
DTYPE_t[:,:] x, int Ngrid, double Lbox, double shifter) nogil:
|
||||
DTYPE_t[:,:] x, int Ngrid, double Lbox, double shifter) noexcept nogil:
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3]
|
||||
@ -419,7 +419,7 @@ cdef void INTERNAL_project_cic_no_mass(DTYPE_t[:,:,:] g,
|
||||
@cython.boundscheck(False)
|
||||
@cython.cdivision(True)
|
||||
cdef void INTERNAL_project_cic_no_mass_periodic(DTYPE_t[:,:,:] g,
|
||||
DTYPE_t[:,:] x, int Ngrid, double Lbox, double shifter) nogil:
|
||||
DTYPE_t[:,:] x, int Ngrid, double Lbox, double shifter) noexcept nogil:
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3]
|
||||
@ -462,7 +462,7 @@ cdef void INTERNAL_project_cic_no_mass_periodic(DTYPE_t[:,:,:] g,
|
||||
cdef void INTERNAL_project_cic_with_mass(DTYPE_t[:,:,:] g,
|
||||
DTYPE_t[:,:] x,
|
||||
DTYPE_t[:] mass,
|
||||
int Ngrid, double Lbox, double shifter) nogil:
|
||||
int Ngrid, double Lbox, double shifter) noexcept nogil:
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
cdef double a[3]
|
||||
@ -499,7 +499,7 @@ cdef void INTERNAL_project_cic_with_mass(DTYPE_t[:,:,:] g,
|
||||
cdef void INTERNAL_project_cic_with_mass_periodic(DTYPE_t[:,:,:] g,
|
||||
DTYPE_t[:,:] x,
|
||||
DTYPE_t[:] mass,
|
||||
int Ngrid, double Lbox, double shifter) nogil:
|
||||
int Ngrid, double Lbox, double shifter) noexcept nogil:
|
||||
cdef double half_Box = 0.5*Lbox, m0
|
||||
cdef double delta_Box = Ngrid/Lbox
|
||||
cdef int i
|
||||
@ -680,7 +680,7 @@ cdef DTYPE_t cube_integral_trilin(DTYPE_t u[3], DTYPE_t u0[3], int r[1], DTYPE_t
|
||||
|
||||
@cython.boundscheck(False)
|
||||
cdef DTYPE_t integrator0(DTYPE_t[:,:,:] density,
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil:
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) noexcept nogil:
|
||||
cdef DTYPE_t d
|
||||
|
||||
d = density[iu0[0], iu0[1], iu0[2]]
|
||||
@ -689,7 +689,7 @@ cdef DTYPE_t integrator0(DTYPE_t[:,:,:] density,
|
||||
|
||||
@cython.boundscheck(False)
|
||||
cdef DTYPE_t integrator1(DTYPE_t[:,:,:] density,
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil:
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) noexcept nogil:
|
||||
cdef DTYPE_t vertex_value[8]
|
||||
cdef DTYPE_t d
|
||||
cdef int a[3][2]
|
||||
@ -717,7 +717,7 @@ cdef DTYPE_t integrator1(DTYPE_t[:,:,:] density,
|
||||
cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density,
|
||||
DTYPE_t a_u[3],
|
||||
DTYPE_t min_distance,
|
||||
DTYPE_t max_distance, DTYPE_t[:] shifter, int integrator_id) nogil except? 0:
|
||||
DTYPE_t max_distance, DTYPE_t[:] shifter, int integrator_id) except? 0 nogil:
|
||||
|
||||
cdef DTYPE_t u[3]
|
||||
cdef DTYPE_t ifu0[3]
|
||||
@ -733,7 +733,7 @@ cdef DTYPE_t C_line_of_sight_projection(DTYPE_t[:,:,:] density,
|
||||
cdef int jumper[1]
|
||||
|
||||
cdef DTYPE_t (*integrator)(DTYPE_t[:,:,:],
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) nogil
|
||||
DTYPE_t u[3], DTYPE_t u0[3], int u_delta[3], int iu0[3], int jumper[1], DTYPE_t alpha_max) noexcept nogil
|
||||
|
||||
if integrator_id == 0:
|
||||
integrator = integrator0
|
||||
|
Loading…
Reference in New Issue
Block a user