Skip to content

Commit 6ad9db9

Browse files
authored
Merge pull request #29429 from charris/update-highway
MAINT: Update highway to match main.
2 parents aefb00a + 3584ddd commit 6ad9db9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

numpy/_core/src/_simd/_simd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ PyMODINIT_FUNC PyInit__simd(void)
8888
NPY_MTARGETS_CONF_DISPATCH(NPY_CPU_HAVE, ATTACH_MODULE, MAKE_MSVC_HAPPY)
8989
NPY_MTARGETS_CONF_BASELINE(ATTACH_BASELINE_MODULE, MAKE_MSVC_HAPPY)
9090

91-
#if Py_GIL_DISABLED
91+
#ifdef Py_GIL_DISABLED
9292
// signal this module supports running with the GIL disabled
9393
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
9494
#endif

numpy/_core/src/umath/loops_hyperbolic.dispatch.cpp.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ simd_tanh_f64(const double *src, npy_intp ssrc, double *dst, npy_intp sdst, npy_
385385
vec_f64 b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16;
386386
if constexpr(hn::MaxLanes(f64) == 2){
387387
vec_f64 e0e1_0, e0e1_1;
388-
uint64_t index[hn::Lanes(f64)];
388+
uint64_t index[hn::MaxLanes(f64)];
389389
hn::StoreU(idx, u64, index);
390390

391391
/**begin repeat

numpy/_core/src/umath/loops_trigonometric.dispatch.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "simd/simd.h"
66
#include <hwy/highway.h>
7+
78
namespace hn = hwy::HWY_NAMESPACE;
89

910
/*
@@ -184,7 +185,7 @@ simd_sincos_f32(const float *src, npy_intp ssrc, float *dst, npy_intp sdst,
184185
"larger than 256 bits.");
185186
simd_maski = ((uint8_t *)&simd_maski)[0];
186187
#endif
187-
float NPY_DECL_ALIGNED(NPY_SIMD_WIDTH) ip_fback[hn::Lanes(f32)];
188+
float NPY_DECL_ALIGNED(NPY_SIMD_WIDTH) ip_fback[hn::MaxLanes(f32)];
188189
hn::Store(x_in, f32, ip_fback);
189190

190191
// process elements using libc for large elements

0 commit comments

Comments
 (0)