-
Notifications
You must be signed in to change notification settings - Fork 58
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_logand to the logical_and callable #1959
Open
SadiinsoSnowfall
wants to merge
18
commits into
main
Choose a base branch
from
callable-logand
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
22ff6e8
take 1
SadiinsoSnowfall c165f5a
added backends
SadiinsoSnowfall 011a5c3
typo
SadiinsoSnowfall 54b73bd
allow booleans in common_logical
SadiinsoSnowfall 40c67a6
fixed common_logical impl
SadiinsoSnowfall f2a1dc8
fix
SadiinsoSnowfall 131b561
fixed missing case for bool x bool
SadiinsoSnowfall 29abcbd
riscv fix
SadiinsoSnowfall 7ea3c77
avx512 fix
SadiinsoSnowfall 07fd843
fix resolution problem
SadiinsoSnowfall b309af1
fix
SadiinsoSnowfall 3594603
made common_logical more commutative
SadiinsoSnowfall 959832b
fix NO_SIMD
SadiinsoSnowfall 374bbc0
fix
SadiinsoSnowfall c7bdc8a
changed common_logical behaviour
SadiinsoSnowfall 6090b71
fix
SadiinsoSnowfall 78b12f2
revert new behaviour
SadiinsoSnowfall 758da64
added a new logical elementwise callable type
SadiinsoSnowfall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
include/eve/module/core/regular/impl/simd/arm/sve/logical_and.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//================================================================================================== | ||
/* | ||
EVE - Expressive Vector Engine | ||
Copyright : EVE Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
#include <eve/concept/value.hpp> | ||
#include <eve/detail/category.hpp> | ||
#include <eve/detail/implementation.hpp> | ||
|
||
namespace eve::detail | ||
{ | ||
template<callable_options O, typename T, typename U, typename N> | ||
EVE_FORCEINLINE logical<wide<T, N>> logical_and_(EVE_REQUIRES(sve_), O const&, logical<wide<T, N>> v, logical<wide<U, N>> w) noexcept | ||
requires(sve_abi<abi_t<T, N>> || sve_abi<abi_t<U, N>>) | ||
{ | ||
return svmov_z(v, convert(w, as<logical<T>>{})); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
include/eve/module/core/regular/impl/simd/riscv/logical_and.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//================================================================================================== | ||
/* | ||
EVE - Expressive Vector Engine | ||
Copyright : EVE Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
#include <eve/concept/compatible.hpp> | ||
#include <eve/concept/value.hpp> | ||
#include <eve/detail/implementation.hpp> | ||
|
||
namespace eve::detail | ||
{ | ||
template<callable_options O, typename T, typename U, typename N> | ||
EVE_FORCEINLINE logical<wide<T, N>> logical_and_(EVE_REQUIRES(rvv_), O const&, logical<wide<T, N>> a, logical<wide<U, N>> b) noexcept | ||
requires(rvv_abi<abi_t<T, N>> || rvv_abi<abi_t<U, N>>) | ||
{ | ||
return __riscv_vmand(a, bit_cast(b, as<logical<wide<T, N>>>{}), N::value); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
include/eve/module/core/regular/impl/simd/x86/logical_and.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//================================================================================================== | ||
/* | ||
EVE - Expressive Vector Engine | ||
Copyright : EVE Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
#include <eve/concept/compatible.hpp> | ||
#include <eve/concept/value.hpp> | ||
#include <eve/detail/implementation.hpp> | ||
|
||
namespace eve::detail | ||
{ | ||
template<callable_options O, typename T, typename U, typename N> | ||
EVE_FORCEINLINE logical<wide<T, N>> logical_and_(EVE_REQUIRES(sse2_), O const& opts, logical<wide<T, N>> a, logical<wide<U, N>> b) noexcept | ||
requires (x86_abi<abi_t<T, N>> || x86_abi<abi_t<U, N>>) | ||
{ | ||
if constexpr (use_is_wide_logical<abi_t<T, N>>::value) | ||
{ | ||
return logical_and.behavior(cpu_{}, opts, a, b); | ||
} | ||
else | ||
{ | ||
typename logical<wide<T, N>>::storage_type dst; | ||
dst.value = a.storage().value & b.storage().value; | ||
return dst; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem right anymore. I appreciate that you might not had time to fix it and this is a draft.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How so ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return type shouldn't change based on what logical is first