- Note
- You might be looking for
eve::if_else_
.
Defined in Header
#include <eve/module/core.hpp>
(TODO: support mixing more than 2 registers)
Accepts a pattern with just 0 and 1 that indicates number of the element for the current slot
blend([0, 1, 2, 3], [4, 5, 6, 7], pattern<1, 0, 0, 1>) -> [4, 1, 2, 7].
As any named shuffle, allows to specify a group size.
template<
simd_value T, std::ptrdiff_t G, std::ptrdiff_t ...I>
template<simd_value T, std::ptrdiff_t G>
Specifies that a type is a SIMD type. The concept simd_value<T> is satisfied if and only if T satisfi...
Definition vectorized.hpp:34
constexpr auto blend
a named shuffle for mixing 2 registers together, without changing positions.
Definition blend.hpp:150
SIMD register cardinal type.
Definition cardinal.hpp:15
Shuffling pattern.
Definition pattern.hpp:27
Parameters
- x, y - values to shuffle.
- G - (optional) - number of elements to treat as one.
- pattern - how to shuffle elements I == 0 -> take a group from x I == 1 -> take a group from y
- gen - eve::pattern_formula = alternative way to specify a pattern, computing it from index and size.
Return value
Returns a register with elements selected according to the mask.
#include <eve/module/core.hpp>
#include <tts/tts.hpp>
int
main()
{
w_t x {0, 1, 2, 3};
w_t y {4, 5, 6, 7};
TTS_EXPECT(
}
constexpr callable_all_ all
Computes a bool value which is true if and only if all elements of x are not zero.
Definition all.hpp:58
constexpr auto pattern
Generate a shuffling pattern.
Definition pattern.hpp:90
Wrapper for SIMD registers.
Definition wide.hpp:70