syclreference.com
  1. SYCL
  2. | API Reference
  3. | Built-Ins
  4. | smoothstep

smoothstep

Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 and 1 when edge0 < x < edge1.


template <typename F1, typename F2, detail::enable_if_t<((detail::builtin::is_genfloat<F1>::value && std::is_same<F1, F2>::value) || (std::is_same<F1, half>::value && detail::builtin::is_genfloath<F2>::value) || (std::is_same<F1, float>::value && detail::builtin::is_genfloatf<F2>::value) || (std::is_same<F1, double>::value && detail::builtin::is_genfloatd<F2>::value)), int> >
F2 smoothstep(F1 edge0, F1 edge1, F2 x)
(1)
  1. Returns 0.0 if `x <= edge0` and 1.0 if `x >= edge1` and performs smooth Hermite interpolation between 0 and 1 when `edge0 < x < edge1`.
    Parameters:
    • F1 edge0
    • F1 edge1
    • F2 x

syclreference.com — SYCL Reference Pages

Last updated: 2019-01-24 00:24:52 +0000