E.V.E  0.1-beta

◆ slice() [1/2]

template<typename Type , typename Cardinal >
auto eve::logical< wide< Type, Cardinal > >::slice ( ) const
inline

Slice a eve::logical into two eve::logical of half cardinal. Does not participate in overload resolution if Cardinal::value == 1.

Example:

See it live on Compiler Explorer

#include <eve/logical.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
// Generates the logical<wide> [true false true .. ]
eve::logical<eve::wide<int>> r = [](auto i, auto) { return i%2 == 0;};
std::cout << r << "\n";
auto[lo,hi] = r.slice();
std::cout << lo << " " << hi << "\n";
}
constexpr callable_hi_ hi
Callable object computing the higher part of the values.
Definition: hi.hpp:59
constexpr callable_lo_ lo
Callable object computing the lower part of the values.
Definition: lo.hpp:59
Wrapper for SIMD compatible logical types.
Definition: logical.hpp:36