Skip to content

Commit 18f7196

Browse files
max
1 parent 1116a48 commit 18f7196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)