Skip to content

Function broadcast

function broadcast(T) simd

template <size_t N, typename T>
constexpr KFR_INTRINSIC vec<T, N> broadcast(T x) { … }

Broadcast a scalar to all N elements of a vector.

Template parameters
N Target vector width.
Parameters
x Scalar value to broadcast.
Returns
A vec<T, N> with every element equal to x .

Fully qualified name: kfr::broadcast(T)

Declared at simd/vec.hpp:887

Function broadcast

function broadcast(const Ts &...) simd

template <size_t Nout, typename... Ts, typename C = typename std::common_type<Ts...>::type>
KFR_INTRINSIC vec<C, Nout> broadcast(const Ts&... values)

Broadcasts a pack of scalar values into a vector of length Nout.

The supplied values are repeated cyclically to fill all Nout lanes. The common type of all values is used as the element type.

Template parameters
Nout Output vector length.
Ts Input scalar types.
C Common type of Ts, used as the element type.
Parameters
values Scalar values to broadcast from.
Returns
A vector of length Nout filled by cycling through values.

Fully qualified name: kfr::broadcast(const Ts &...)

Declared at simd/shuffle.hpp:269

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.