default¶
simd_allones
function¶
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
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#L1153
simd_bitcast
function¶
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
template <typename Tout, typename Tin, size_t N,
size_t Nout = (sizeof(Tin) * N / sizeof(Tout))
#ifdef _MSC_VER
,
KFR_ENABLE_IF((Nout == 1 || N == 1) &&
!is_same<Tout, Tin>)
#else
,
KFR_ENABLE_IF(Nout == 1 || N == 1)
#endif
>
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))
#ifdef _MSC_VER
,
KFR_ENABLE_IF((Nout == 1 || N == 1) && !is_same<Tout, Tin>)
#else
,
KFR_ENABLE_IF(Nout == 1 || N == 1)
#endif
>
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#L1171
template <typename Tout, typename Tin, size_t N,
size_t Nout = (sizeof(Tin) * N / sizeof(Tout))
#ifdef _MSC_VER
,
KFR_ENABLE_IF(Nout > 1 && N > 1 &&
!is_same<Tout, Tin>)
#else
,
KFR_ENABLE_IF(Nout > 1 && N > 1)
#endif
>
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))
#ifdef _MSC_VER
,
KFR_ENABLE_IF(Nout > 1 && N > 1 && !is_same<Tout, Tin>)
#else
,
KFR_ENABLE_IF(Nout > 1 && N > 1)
#endif
>
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#L1187
simd_convert
function¶
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
template <typename Tout, typename Tin,
KFR_ENABLE_IF(!std::is_same<Tout, Tin>::value)>
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_ENABLE_IF(!std::is_same<Tout, Tin>::value)>
KFR_INTRINSIC simd<Tout, 1> simd_convert(simd_cvt_t<Tout, Tin, 1>, const simd<Tin, 1>& x) CMT_NOEXCEPT
{
return simd_make(ctype<Tout>, static_cast<Tout>(x));
}
https://github.com/kfrlib/kfr/blob//include/kfr/simd/impl/backend_generic.hpp#L1406
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#L1413
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#L1425
simd_undefined
function¶
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
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#L1136
simd_zeros
function¶
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
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#L1145
Auto-generated from sources, Revision , https://github.com/kfrlib/kfr/blob//include/kfr/