Skip to content

Commit

Permalink
fix to_logical
Browse files Browse the repository at this point in the history
  • Loading branch information
SadiinsoSnowfall committed Nov 12, 2024
1 parent 2e9dafc commit 11d84ed
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
12 changes: 6 additions & 6 deletions include/eve/detail/function/simd/arm/sve/to_logical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

namespace eve::detail
{
template<typename T, typename N>
EVE_FORCEINLINE auto
to_logical(wide<T, N> const& v) noexcept requires sve_abi<abi_t<T, N>>
{
return v != 0;
}
template<typename T, typename N>
EVE_FORCEINLINE logical<wide<T, N>> to_logical(wide<T, N> v) noexcept
requires sve_abi<abi_t<T, N>>
{
return v != 0;
}
}
2 changes: 1 addition & 1 deletion include/eve/detail/function/simd/ppc/to_logical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace eve::detail
// Wide to Logical
//================================================================================================
template<typename T, typename N>
EVE_FORCEINLINE as_logical_t<wide<T,N>> to_logical( wide<T,N> const& v ) noexcept
EVE_FORCEINLINE as_logical_t<wide<T,N>> to_logical(wide<T,N> v) noexcept
requires ppc_abi<abi_t<T, N>>
{
return as_logical_t<wide<T,N>>(vec_cmpne(v.storage(), wide<T,N>{0}.storage()));
Expand Down
14 changes: 6 additions & 8 deletions include/eve/detail/function/simd/riscv/to_logical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@

namespace eve::detail
{
template<typename T, typename N>
EVE_FORCEINLINE auto
to_logical(wide<T, N> const& v) noexcept
requires rvv_abi<abi_t<T, N>>
{
return v != static_cast<T>(0);
}

template<typename T, typename N>
EVE_FORCEINLINE logical<wide<T, N>> to_logical(wide<T, N> v) noexcept
requires rvv_abi<abi_t<T, N>>
{
return v != static_cast<T>(0);
}
}

0 comments on commit 11d84ed

Please sign in to comment.