-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
920ceaa
commit 19c4348
Showing
45 changed files
with
865 additions
and
705 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//================================================================================================== | ||
/* | ||
EVE - Expressive Vector Engine | ||
Copyright : EVE Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
#include <eve/module/core/regular/if_else.hpp> | ||
|
||
namespace eve::detail | ||
{ | ||
|
||
template<typename P, arithmetic_scalar_value T, typename N, std::ptrdiff_t G> | ||
EVE_FORCEINLINE auto | ||
shuffle_l2_sve_blend(P, fixed<G>, wide<T, N> x, wide<T, N> y) | ||
{ | ||
// here using idxs, not idxs2match, no zeroing blend on sve | ||
if constexpr( !idxm::is_blend(P::idxs, N::value / G) ) return no_matching_shuffle; | ||
else | ||
{ | ||
eve::logical<wide<T, N>> m([](int i, int size) { return P::idxs[i / G] >= size / G; }); | ||
return wide<T, N>{svsel(m, y, x)}; | ||
} | ||
} | ||
|
||
template<typename P, arithmetic_scalar_value T, typename N, std::ptrdiff_t G> | ||
EVE_FORCEINLINE auto | ||
shuffle_l2_(EVE_SUPPORTS(sve_), P p, fixed<G> g, wide<T, N> x, wide<T, N> y) | ||
requires(P::out_reg_size == P::reg_size) | ||
{ | ||
if constexpr( auto r = shuffle_l2_sve_blend(p, g, x, y); matched_shuffle<decltype(r)> ) | ||
{ | ||
return r; | ||
} | ||
else return no_matching_shuffle_t {}; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
include/eve/detail/shuffle_v2/simd/common/shuffle_l6_l7.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,41 @@ | ||
//================================================================================================== | ||
/* | ||
EVE - Expressive Vector Engine | ||
Copyright : EVE Project Contributors | ||
SPDX-License-Identifier: BSL-1.0 | ||
*/ | ||
//================================================================================================== | ||
#pragma once | ||
|
||
namespace eve::detail | ||
{ | ||
|
||
template<typename P, logical_simd_value T, std::ptrdiff_t G> | ||
EVE_FORCEINLINE auto | ||
shuffle_l6_l7_blend_nonwide_logicals(P, fixed<G>, T x, T y) | ||
{ | ||
if constexpr( !idxm::is_blend(P::idxs, T::size() / G) ) | ||
{ | ||
return kumi::tuple {no_matching_shuffle, eve::index<-1>}; | ||
} | ||
else | ||
{ | ||
T m([](int i, int size) { return P::idxs[i / G] >= size / G; }); | ||
return kumi::tuple {(x && !m) || (y && m), eve::index<6>}; | ||
} | ||
} | ||
|
||
// common non wide logical thinking | ||
template<typename P, logical_simd_value T, std::ptrdiff_t G> | ||
EVE_FORCEINLINE auto | ||
shuffle_l6_l7_(EVE_SUPPORTS(cpu_), P p, fixed<G> g, T x, T y) | ||
{ | ||
if constexpr( auto r = shuffle_l6_l7_blend_nonwide_logicals(p, g, x, y); | ||
matched_shuffle<decltype(get<0>(r))> ) | ||
{ | ||
return r; | ||
} | ||
else return no_matching_shuffle; | ||
} | ||
|
||
} |
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
Oops, something went wrong.