Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move self_less to the is_less callable #2048

Merged
merged 19 commits into from
Jan 24, 2025
Merged

Conversation

SadiinsoSnowfall
Copy link
Collaborator

No description provided.

include/eve/arch/cpu/wide.hpp Outdated Show resolved Hide resolved
include/eve/arch/cpu/wide.hpp Outdated Show resolved Hide resolved
include/eve/concept/element_type.hpp Outdated Show resolved Hide resolved
include/eve/concept/value.hpp Show resolved Hide resolved
include/eve/module/core/regular/impl/is_less.hpp Outdated Show resolved Hide resolved
include/eve/module/core/regular/impl/simd/x86/is_less.hpp Outdated Show resolved Hide resolved
include/eve/module/core/regular/impl/simd/x86/is_less.hpp Outdated Show resolved Hide resolved
@DenisYaroshevskiy
Copy link
Collaborator

How to forward declare the common_logical: https://godbolt.org/z/v3T1Pofbn

namespace eve::detail
{
template<callable_options O, typename T>
EVE_FORCEINLINE constexpr common_logical_t<T> is_less_(EVE_REQUIRES(cpu_), O const& o, T a, T b) noexcept
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common_logical_t makes no sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{
// static_assert( valid_tolerance<common_value_t<T, U>, Options>::value, "[eve::is_less] simd tolerance requires at least one simd parameter." );
return EVE_DISPATCH_CALL(a, b);
}

template<arithmetic_value T, arithmetic_value U>
constexpr EVE_FORCEINLINE common_logical_t<T, U> operator()(T a, U b) const
requires (compatible_arithmetic_values<T, U> && !Options::contains(definitely))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to static assert for now

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to the static_assert

constexpr EVE_FORCEINLINE common_logical_t<T,U> operator()(T a, U b) const
template<arithmetic_value T, arithmetic_value U>
constexpr EVE_FORCEINLINE common_logical_t<T, U> operator()(T a, U b) const
requires (compatible_arithmetic_values<T, U>)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the static assert in the interface please

@SadiinsoSnowfall SadiinsoSnowfall merged commit 08cc362 into main Jan 24, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants