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

mix

Returns the linear blend of x&y implemented as: x + (y - x) * a. a must be a value in the range 0.0 ... 1.0. If a is not in the range 0.0 … 1.0, the return values are undefined.


template <typename F1, typename F2, detail::enable_if_t<((detail::builtin::is_genfloat<F1>::value && std::is_same<F1, F2>::value) || (detail::builtin::is_genfloath<F1>::value && std::is_same<F2, half>::value) || (detail::builtin::is_genfloatf<F1>::value && std::is_same<F2, float>::value) || (detail::builtin::is_genfloatd<F1>::value && std::is_same<F2, double>::value)), int> >
F1 mix(F1 x, F1 y, F2 a)
(1)
  1. Returns the linear blend of x&y implemented as: x + (y - x) * a. a must be a value in the range `0.0 ... 1.0`. If a is not in the range 0.0 ... 1.0, the return values are undefined.
    Parameters:
    • F1 x
    • F1 y
    • F2 a

syclreference.com — SYCL Reference Pages

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