Skip to content

Commit da91eb8

Browse files
max
1 parent 1116a48 commit da91eb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ namespace xsimd
10551055
XSIMD_INLINE batch_bool<T, A> gt(batch<T, A> const& lhs, batch<T, A> const& rhs, requires_arch<neon>) noexcept
10561056
{
10571057
using register_type = typename batch<T, A>::register_type;
1058-
return batch_bool<T, A> { vshrq_n_s64(vqsubq_s64(register_type(lhs), register_type(rhs)), 63) };
1058+
return batch_bool<T, A>(vshrq_n_s64(vqsubq_s64(register_type(lhs), register_type(rhs)), 63));
10591059
}
10601060

10611061
template <class A, class T, detail::enable_sized_unsigned_t<T, 8> = 0>
@@ -1331,7 +1331,7 @@ namespace xsimd
13311331
template <class A, class T, detail::enable_sized_integral_t<T, 8> = 0>
13321332
XSIMD_INLINE batch<T, A> min(batch<T, A> const& lhs, batch<T, A> const& rhs, requires_arch<neon>) noexcept
13331333
{
1334-
return { std::min(lhs.get(0), rhs.get(0)), std::min(lhs.get(1), rhs.get(1)) };
1334+
return select(lhs > rhs, rhs, lhs);
13351335
}
13361336

13371337
/*******
@@ -1355,7 +1355,7 @@ namespace xsimd
13551355
template <class A, class T, detail::enable_sized_integral_t<T, 8> = 0>
13561356
XSIMD_INLINE batch<T, A> max(batch<T, A> const& lhs, batch<T, A> const& rhs, requires_arch<neon>) noexcept
13571357
{
1358-
return { std::max(lhs.get(0), rhs.get(0)), std::max(lhs.get(1), rhs.get(1)) };
1358+
return select(lhs > rhs, lhs, rhs);
13591359
}
13601360

13611361
/*******

0 commit comments

Comments
 (0)