8000 MAINT: add TODO comments for pcg64 improvements · numpy/numpy@161f69e · GitHub
[go: up one dir, main page]

Skip to content

Commit 161f69e

Browse files
committed
MAINT: add TODO comments for pcg64 improvements
1 parent ca1a509 commit 161f69e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

numpy/random/randomgen/pcg64.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ cdef class PCG64:
278278
state of the RNG
279279
"""
280280
# IF PCG_EMULATED_MATH==1:
281+
# TODO: push this into an #ifdef in the C code
281282
state = 2 **64 * self.rng_state.pcg_state.state.high
282283
state += self.rng_state.pcg_state.state.low
283284
inc = 2 **64 * self.rng_state.pcg_state.inc.high

numpy/random/randomgen/setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def generate_libraries(ext, build_dir):
7676
EXTRA_INCLUDE_DIRS += [join(MOD_DIR, 'src', 'common')]
7777

7878
PCG64_DEFS = []
79+
# TODO: remove the unconditional forced emulation, move code from pcg64.pyx
80+
# to an #ifdef
7981
if 1 or sys.maxsize < 2 ** 32 or os.name == 'nt':
8082
# Force emulated mode here
8183
PCG_EMULATED_MATH = True

0 commit comments

Comments
 (0)
0