summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorSayed Adel <seiko@imavr.com>2023-05-04 09:22:53 +0000
committerSayed Adel <seiko@imavr.com>2023-05-04 11:32:04 +0200
commitf168c41412693f3b934b70d458739427b957dfd3 (patch)
tree7291702550933e8205dc500ebc9a389c72a52861 /numpy/core
parent9163e933df91b516b6f0c7a9ba8ad1750e642f37 (diff)
downloadnumpy-f168c41412693f3b934b70d458739427b957dfd3.tar.gz
Bug: Fix compilation of halffloat with gcc 13.1
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/src/common/half.hpp2
-rw-r--r--numpy/core/src/common/npstd.hpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/src/common/half.hpp b/numpy/core/src/common/half.hpp
index e5f3f7a40..4d16e3bcc 100644
--- a/numpy/core/src/common/half.hpp
+++ b/numpy/core/src/common/half.hpp
@@ -72,7 +72,7 @@ class Half final {
{
#if defined(NPY_HAVE_AVX512FP16)
__m128d md = _mm_load_sd(&f);
- bits_ = static_cast<uint16_t>(_mm_cvtsi128_si32(_mm_castph_si128(_mm_cvtpd_ph(mf))));
+ bits_ = static_cast<uint16_t>(_mm_cvtsi128_si32(_mm_castph_si128(_mm_cvtpd_ph(md))));
#elif defined(NPY_HAVE_VSX3) && defined(NPY_HAVE_VSX_ASM)
__vector double vf64 = vec_splats(f);
__vector unsigned short vf16;
diff --git a/numpy/core/src/common/npstd.hpp b/numpy/core/src/common/npstd.hpp
index ca664229a..92e3d5cc5 100644
--- a/numpy/core/src/common/npstd.hpp
+++ b/numpy/core/src/common/npstd.hpp
@@ -4,6 +4,7 @@
#include <cstddef>
#include <cstring>
#include <cctype>
+#include <cstdint>
#include <string>
#include <algorithm>