Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Add missing noexcept to shuffle helpers #25115

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions numpy/random/_generator.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cdef int64_t _safe_sum_nonneg_int64(size_t num_colors, int64_t *colors):
cdef inline void _shuffle_raw_wrap(bitgen_t *bitgen, np.npy_intp n,
np.npy_intp first, np.npy_intp itemsize,
np.npy_intp stride,
char* data, char* buf) nogil:
char* data, char* buf) noexcept nogil:
# We trick gcc into providing a specialized implementation for
# the most common case, yielding a ~33% performance improvement.
# Note that apparently, only one branch can ever be specialized.
Expand All @@ -76,7 +76,7 @@ cdef inline void _shuffle_raw_wrap(bitgen_t *bitgen, np.npy_intp n,
cdef inline void _shuffle_raw(bitgen_t *bitgen, np.npy_intp n,
np.npy_intp first, np.npy_intp itemsize,
np.npy_intp stride,
char* data, char* buf) nogil:
char* data, char* buf) noexcept nogil:
"""
Parameters
----------
Expand Down Expand Up @@ -107,7 +107,7 @@ cdef inline void _shuffle_raw(bitgen_t *bitgen, np.npy_intp n,


cdef inline void _shuffle_int(bitgen_t *bitgen, np.npy_intp n,
np.npy_intp first, int64_t* data) nogil:
np.npy_intp first, int64_t* data) noexcept nogil:
"""
Parameters
----------
Expand Down