gentype
mix
(
| gentype x, |
gentype y, | |
gentype a) |
gentype
mix
(
| gentype x, |
gentype y, | |
float a) |
Returns the linear blend of x
and y
implemented as:
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.
The mix function can be implemented using contractions such as mad or fma.
This function can be implemented using contractions such as mad or fma.
Built-in common functions operate component-wise and the description is per-component and are implemented using the round to nearest even rounding mode. We use the generic type name gentype to indicate that the function can take float, float2, float3, float4, float8, or float16 as the type for the arguments.
The built-in common functions are implemented using the round to nearest even rounding mode.
If extended with cl_khr_fp64, generic type name gentype may indicate double and double{2|3|4|8|16} as arguments and return values. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{2|3|4|8|16} as arguments and return values.