gentype
mix
(
 gentype x, 
gentype y,  
gentype a) 
gentype
mix
(
 gentype x, 
gentype y,  
float a) 
gentype mix (gentype x ,
gentype y , double a ) // if double extension enabled

gentype mix (gentype x ,
gentype y , half a ) // if half extension enabled

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.
Builtin common functions operate componentwise and the description is percomponent. We use the generic type name gentype to indicate that the function can take float, float2, float4, float8, or float16 as the type for the arguments.
The builtin common functions are implemented using the round to nearest even rounding mode.
This function can be implemented using contractions such as mad or fma.
If extended with cl_khr_fp64, generic type name gentype may indicate double and double{24816} as arguments and return values. If extended with cl_khr_fp16, generic type name gentype may indicate half and half{24816} as arguments and return values.