Skip to content

Commit

Permalink
avx512 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SadiinsoSnowfall committed Sep 20, 2024
1 parent 9a6f727 commit 8f95b6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ namespace eve::detail
}
else
{
return a.storage().value & b.storage().value;
typename logical<wide<T, N>>::storage_type dst;
dst.value = a.storage().value & b.storage().value;
return dst;
}
}
}
4 changes: 2 additions & 2 deletions include/eve/module/core/regular/logical_and.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ namespace eve
template<callable_options O, typename T, typename U>
EVE_FORCEINLINE constexpr auto logical_and_(EVE_REQUIRES(cpu_), O const&, T a, U b) noexcept
{
if constexpr ((scalar_value<T> && scalar_value<U>) || (std::same_as<T, bool> && std::same_as<U, bool>)) return a && b;
if constexpr ((scalar_value<T> || std::same_as<T, bool>) && (scalar_value<U> || std::same_as<U, bool>)) return a && b;
else if constexpr (std::same_as<T, bool>) return logical_and(U{a}, b);
else if constexpr (std::same_as<U, bool>) return logical_and(a, T{b});
else if constexpr (scalar_value<T> && simd_value<U>) return logical_and(as_wide_as_t<T, U>{a}, b);
else if constexpr (simd_value<T> && scalar_value<U>) return logical_and(a, T{b});
else if constexpr (std::same_as<typename T::bits_type, typename U::bits_type>) return bit_cast(a.bits() & b.bits(), as{a});
else if constexpr (std::same_as<typename T::bits_type, typename U::bits_type>) return bit_cast(a.bits() & b.bits(), as<as_logical_t<T>>{});
else return logical_and(a, convert(b, as<typename T::value_type>{}));
}
}
Expand Down

0 comments on commit 8f95b6b

Please sign in to comment.