Required header:
#include <eve/function/broadcast.hpp>
Callable object performing a broadcast shuffling.
Members Functions
Member | Effect |
operator() | Computes the absolute value of its parameter |
template<std::size_t I>
auto operator()(
eve::simd_value auto const& x, eve::index_t<I> i )
const noexcept;
Specifies that a type a SIMD type.
Definition: vectorized.hpp:32
Parameters
x
: An instance of an SIMD value
i
: An eve::index indicating which lane of x
to broadcast
Return value
If x
is an instance of an SIMD value T
, the call is equivalent to T{x.get(I)}
.
Example
See it live on Compiler Explorer
1#include <eve/function/broadcast.hpp>
10 wide_ft pf = {1.2f,0.34f,0.056f,0.0078f};
11 wide_it
pi = {-1, 2,-3, 4,-5, 6,-7, 8};
13 std::cout << pf <<
"\n"
18 std::cout <<
pi <<
"\n"
constexpr callable_pi_ pi
Callable object computing the value.
Definition: pi.hpp:54
constexpr callable_broadcast_ broadcast
Definition: broadcast.hpp:61
Wrapper for SIMD registers.
Definition: wide.hpp:65