Skip to content

Commit 261f82a

Browse files
Get rid of per-lane access in Neon implementation
1 parent 9f587fc commit 261f82a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -717,16 +717,10 @@ namespace xsimd
717717
return vnegq_s32(rhs);
718718
}
719719

720-
template <class A, class T, detail::enable_sized_unsigned_t<T, 8> = 0>
721-
XSIMD_INLINE batch<T, A> neg(batch<T, A> const& rhs, requires_arch<neon>) noexcept
722-
{
723-
return batch<T, A> { -rhs.get(0), -rhs.get(1) };
724-
}
725-
726-
template <class A, class T, detail::enable_sized_signed_t<T, 8> = 0>
720+
template <class A, class T, detail::enable_sized_integral_t<T, 8> = 0>
727721
XSIMD_INLINE batch<T, A> neg(batch<T, A> const& rhs, requires_arch<neon>) noexcept
728722
{
729-
return batch<T, A> { -rhs.get(0), -rhs.get(1) };
723+
return 0 - rhs;
730724
}
731725

732726
template <class A>

0 commit comments

Comments
 (0)