Skip to content

default

simd_allones function

template <typename Tout, size_t N>
simd<Tout, N> simd_allones() CMT_NOEXCEPT

Returns vector with all ones

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_allones() CMT_NOEXCEPT
{
    not_optimized(CMT_FUNC_SIGNATURE);
    simd_array<Tout, N> x{};
    KFR_COMPONENTWISE(x.val[i] = special_constants<Tout>::allones());
    return from_simd_array(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L867

template <typename Tout, size_t N>
simd<Tout, N> simd_allones()

Returns vector with all ones

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_allones()
{
    return special_constants<Tout>::allones();
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L80

simd_bitcast function

template <typename Tout, typename Tin, size_t N,
          size_t Nout = (sizeof(Tin) * N / sizeof(Tout)),
          KFR_ENABLE_IF(Nout == 1 || N == 1)>
simd<Tout, Nout>
simd_bitcast(simd_cvt_t<Tout, Tin, N>,
             const simd<Tin, N> &x) CMT_NOEXCEPT

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin, size_t N, size_t Nout = (sizeof(Tin) * N / sizeof(Tout)),
          KFR_ENABLE_IF(Nout == 1 || N == 1)>
KFR_INTRINSIC simd<Tout, Nout> simd_bitcast(simd_cvt_t<Tout, Tin, N>, const simd<Tin, N>& x) CMT_NOEXCEPT
{
    not_optimized(CMT_FUNC_SIGNATURE);
    return bitcast_anything<simd<Tout, Nout>>(x);
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L878

template <typename Tout, typename Tin, size_t N,
          size_t Nout = (sizeof(Tin) * N / sizeof(Tout)),
          KFR_ENABLE_IF(Nout > 1 && N > 1)>
simd<Tout, Nout>
simd_bitcast(simd_cvt_t<Tout, Tin, N>,
             const simd<Tin, N> &x) CMT_NOEXCEPT

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin, size_t N, size_t Nout = (sizeof(Tin) * N / sizeof(Tout)),
          KFR_ENABLE_IF(Nout > 1 && N > 1)>
KFR_INTRINSIC simd<Tout, Nout> simd_bitcast(simd_cvt_t<Tout, Tin, N>, const simd<Tin, N>& x) CMT_NOEXCEPT
{
    constexpr size_t Nlow = prev_poweroftwo(N - 1);
    return simd_concat<Tout, Nlow * Nout / N, (N - Nlow) * Nout / N>(
        simd_bitcast(simd_cvt_t<Tout, Tin, Nlow>{},
                     simd_shuffle(simd_t<Tin, N>{}, x, csizeseq<Nlow>, overload_auto)),
        simd_bitcast(simd_cvt_t<Tout, Tin, N - Nlow>{},
                     simd_shuffle(simd_t<Tin, N>{}, x, csizeseq<N - Nlow, Nlow>, overload_auto)));
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L887

template <typename Tout, typename Tin, size_t N,
          size_t Nout = (sizeof(Tin) * N / sizeof(Tout))>
simd<Tout, Nout> simd_bitcast(simd_cvt_t<Tout, Tin, N>,
                              const simd<Tin, N> &x)

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin, size_t N, size_t Nout = (sizeof(Tin) * N / sizeof(Tout))>
KFR_INTRINSIC simd<Tout, Nout> simd_bitcast(simd_cvt_t<Tout, Tin, N>, const simd<Tin, N>& x)
{
    return (simd<Tout, Nout>)x;
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L87

simd_convert function

template <typename Tout, typename Tin>
simd<Tout, 1>
    simd_convert(simd_cvt_t<Tout, Tin, 1>,
                 const simd<Tin, 1> &x) CMT_NOEXCEPT

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin>
KFR_INTRINSIC simd<Tout, 1> simd_convert(simd_cvt_t<Tout, Tin, 1>, const simd<Tin, 1>& x) CMT_NOEXCEPT
{
    not_optimized(CMT_FUNC_SIGNATURE);
    return simd_make(ctype<Tout>, static_cast<Tout>(x));
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L1082

template <typename Tout, typename Tin, size_t N>
simd<Tout, N>
simd_convert(simd_cvt_t<Tout, Tin, N>,
             const simd<Tin, N> &x) CMT_NOEXCEPT

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_convert(simd_cvt_t<Tout, Tin, N>, const simd<Tin, N>& x) CMT_NOEXCEPT
{
    constexpr size_t Nlow = prev_poweroftwo(N - 1);
    return simd_concat<Tout, Nlow, N - Nlow>(
        simd_convert(simd_cvt_t<Tout, Tin, Nlow>{},
                     simd_shuffle(simd_t<Tin, N>{}, x, csizeseq<Nlow>, overload_auto)),
        simd_convert(simd_cvt_t<Tout, Tin, N - Nlow>{},
                     simd_shuffle(simd_t<Tin, N>{}, x, csizeseq<N - Nlow, Nlow>, overload_auto)));
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L1090

template <typename T, size_t N>
const simd<T, N> &
simd_convert(simd_cvt_t<T, T, N>,
             const simd<T, N> &x) CMT_NOEXCEPT

Converts input vector to vector with subtype Tout

Source code
template <typename T, size_t N>
KFR_INTRINSIC const simd<T, N>& simd_convert(simd_cvt_t<T, T, N>, const simd<T, N>& x) CMT_NOEXCEPT
{
    return x;
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L1102

template <typename Tout, typename Tin, size_t N>
simd<Tout, N> simd_convert(simd_cvt_t<Tout, Tin, N>,
                           const simd<Tin, N> &x)

Converts input vector to vector with subtype Tout

Source code
template <typename Tout, typename Tin, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_convert(simd_cvt_t<Tout, Tin, N>, const simd<Tin, N>& x)
{
    return __builtin_convertvector(x, simd<Tout, N>);
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L161

template <typename T, size_t N>
simd<T, N> simd_convert(simd_cvt_t<T, T, N>,
                        const simd<T, N> &x)

Converts input vector to vector with subtype Tout

Source code
template <typename T, size_t N>
KFR_INTRINSIC simd<T, N> simd_convert(simd_cvt_t<T, T, N>, const simd<T, N>& x)
{
    return x;
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L168

simd_undefined function

template <typename Tout, size_t N>
simd<Tout, N> simd_undefined() CMT_NOEXCEPT

Returns vector with undefined value

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_undefined() CMT_NOEXCEPT
{
    not_optimized(CMT_FUNC_SIGNATURE);
    simd<Tout, N> x;
    return x;
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L850

template <typename Tout, size_t N>
simd<Tout, N> simd_undefined()

Returns vector with undefined value

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_undefined()
{
    simd<Tout, N> x;
    return x;
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L65

simd_zeros function

template <typename Tout, size_t N>
simd<Tout, N> simd_zeros() CMT_NOEXCEPT

Returns vector with all zeros

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_zeros() CMT_NOEXCEPT
{
    not_optimized(CMT_FUNC_SIGNATURE);
    return from_simd_array<Tout, N>({ Tout() });
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L859

template <typename Tout, size_t N>
simd<Tout, N> simd_zeros()

Returns vector with all zeros

Source code
template <typename Tout, size_t N>
KFR_INTRINSIC simd<Tout, N> simd_zeros()
{
    return Tout();
}

https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_clang.hpp#L73


Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/