Skip to content

Commit

Permalink
Follow up to AequilibraE#440
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Moss committed Aug 18, 2023
1 parent 6dcab36 commit a664f7e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions aequilibrae/paths/hyperpath.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ cdef struct IndexedElement:
size_t index
DATATYPE_t value

cdef int _compare(const_void *a, const_void *b):
cdef int _compare(const_void *a, const_void *b) noexcept:
cdef DATATYPE_t v = (<IndexedElement*> a).value-(<IndexedElement*> b).value
if v < 0: return -1
if v >= 0: return 1
Expand All @@ -65,7 +65,7 @@ cdef void _coo_tocsc_uint32(
cnp.uint32_t [::1] Ax,
cnp.uint32_t [::1] Bp,
cnp.uint32_t [::1] Bi,
cnp.uint32_t [::1] Bx) nogil:
cnp.uint32_t [::1] Bx) noexcept nogil:

cdef:
size_t i, col, dest
Expand Down Expand Up @@ -101,7 +101,7 @@ cdef void _coo_tocsc_uint32(
@cython.wraparound(False)
@cython.embedsignature(False)
@cython.initializedcheck(False)
cdef void argsort(cnp.float64_t *data, cnp.uint32_t *order, size_t n) nogil:
cdef void argsort(cnp.float64_t *data, cnp.uint32_t *order, size_t n) noexcept nogil:
"""
Wrapper of the C function qsort
source: https://github.com/jcrudy/cython-argsort/tree/master/cyargsort
Expand All @@ -127,7 +127,7 @@ cdef void argsort(cnp.float64_t *data, cnp.uint32_t *order, size_t n) nogil:
free(order_struct)


cpdef convert_graph_to_csc_uint32(edges, tail, head, data, vertex_count):
cpdef convert_graph_to_csc_uint32(edges, tail, head, data, vertex_count) noexcept :
"""
Convert an edge dataframe in COO format into CSC format.
Expand Down Expand Up @@ -196,7 +196,7 @@ cdef cnp.float64_t *compute_SF_in_parallel(
size_t vertex_count,
size_t edge_count,
int num_threads,
) nogil:
) noexcept nogil:
# Thread local variables are prefixed by "thread", anything else should be considered shared and thus read only
if output_travel_time:
with gil:
Expand Down Expand Up @@ -318,7 +318,7 @@ cdef void compute_SF_in(
cnp.uint32_t *edge_indices,
size_t vertex_count,
int dest_vert_index,
) nogil:
) noexcept nogil:

cdef:
size_t edge_count = <size_t>tail_indices.shape[0]
Expand Down Expand Up @@ -420,7 +420,7 @@ cdef void _SF_in_first_pass_full(
cnp.float64_t *u_j_c_a_vec,
cnp.uint8_t *h_a_vec,
int dest_vert_index,
) nogil:
) noexcept nogil:
"""All vertices are visited."""

cdef:
Expand Down Expand Up @@ -517,7 +517,7 @@ cdef void _SF_in_second_pass(
cnp.float64_t *f_i_vec,
cnp.float64_t[::1] f_a_vec,
size_t h_a_count
) nogil:
) noexcept nogil:

cdef:
size_t i, edge_idx, vert_idx
Expand Down

0 comments on commit a664f7e

Please sign in to comment.