From 60d9bfb69270d31df6c211e098fb443ab344f2af Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Mon, 12 Jul 2021 08:58:17 -0500 Subject: [PATCH] MAINT: Avoid unicode characters in division SIMD code comments This avoids unicode characters in the division SIMD code to circumvent problems reading the utf-8 encoded file in windows. The proper fix is probably to just assume utf-8 and feel free to use unicode characters in `c.src` files. But here, it doesn't matter too much to just avoid utf-8 quickly. See gh-19454 --- numpy/core/src/umath/loops_arithmetic.dispatch.c.src | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/numpy/core/src/umath/loops_arithmetic.dispatch.c.src b/numpy/core/src/umath/loops_arithmetic.dispatch.c.src index 19e05f2b57b0..1ddf7c3b1a6f 100644 --- a/numpy/core/src/umath/loops_arithmetic.dispatch.c.src +++ b/numpy/core/src/umath/loops_arithmetic.dispatch.c.src @@ -22,17 +22,17 @@ ** Defining the SIMD kernels * * Floor division of signed is based on T. Granlund and P. L. Montgomery - * “Division by invariant integers using multiplication(see [Figure 6.1] + * "Division by invariant integers using multiplication(see [Figure 6.1] * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.1.2556)" * For details on TRUNC division see simd/intdiv.h for more clarification *********************************************************************************** - ** Figure 6.1: Signed division by run–time invariant divisor, rounded towards -INF + ** Figure 6.1: Signed division by run-time invariant divisor, rounded towards -INF *********************************************************************************** * For q = FLOOR(a/d), all sword: - * sword −dsign = SRL(d, N − 1); - * uword −nsign = (n < −dsign); - * uword −qsign = EOR(−nsign, −dsign); - * q = TRUNC((n − (−dsign ) + (−nsign))/d) − (−qsign); + * sword -dsign = SRL(d, N - 1); + * uword -nsign = (n < -dsign); + * uword -qsign = EOR(-nsign, -dsign); + * q = TRUNC((n - (-dsign ) + (-nsign))/d) - (-qsign); ********************************************************************************/ #if NPY_SIMD