E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
slice()
[2/2]
template<arithmetic_scalar_value Type, typename Cardinal >
template<std::size_t Slice>
requires (Cardinal::value > 1)
auto
eve::wide
< Type, Cardinal >::slice
(
slice_t< Slice >
s
)
const
inline
See also
eve::upper_
eve::lower_
Parameters
s
A tag indicating which slice is required
Example:
#include <eve/wide.hpp>
#include <iostream>
int
main()
{
// Generates the wide [1 ... N]
eve::wide<int>
r = [](
auto
i,
auto
c) {
return
i + 1;};
std::cout << r <<
"\n"
;
auto
lo
= r.
slice
(eve::lower_);
auto
hi
= r.
slice
(eve::upper_);
std::cout <<
lo
<<
" "
<<
hi
<<
"\n"
;
}
eve::lo
constexpr auto lo
Computes the least significant half of each lane.
Definition
lo.hpp:73
eve::hi
constexpr auto hi
elementwise_callable computing the most significant half of each lane.
Definition
hi.hpp:71
eve::wide::slice
auto slice() const
Slice a eve::wide into two eve::wide of half cardinal. Does not participate in overload resolution if...
Definition
wide.hpp:294
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:70
eve
wide