/* !!!! AUTOGENERATED FILE generated by convert_type.py !!!!!

   DON'T CHANGE THIS FILE. MAKE YOUR CHANGES TO convert_type.py AND RUN:
   $ ./generate-conversion-type-cl.sh

   OpenCL type conversion functions

   Copyright (c) 2013 Victor Oliveira <victormatheus@gmail.com>
   Copyright (c) 2013 Jesse Towner <jessetowner@lavabit.com>

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included in
   all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   THE SOFTWARE.
*/

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(char x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(char2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(char4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(char8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(char16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(char3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(char x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(char2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(char4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(char8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(char16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(char3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(char x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(char2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(char4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(char8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(char16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(char3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(char x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(char2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(char4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(char8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(char16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(char3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(char x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(char2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(char4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(char8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(char16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(char3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(char x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(char2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(char4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(char8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(char16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(char3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(char x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(char2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(char4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(char8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(char16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(char3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(char x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(char2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(char4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(char8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(char16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(char3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(char x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(char2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(char4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(char8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(char16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(char3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(char x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(char2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(char4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(char8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(char16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(char3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(char x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(char2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(char4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(char8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(char16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(char3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(uchar x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(uchar2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(uchar4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(uchar8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(uchar16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(uchar3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(uchar x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(uchar2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(uchar4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(uchar8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(uchar16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(uchar3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(uchar x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(uchar2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(uchar4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(uchar8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(uchar16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(uchar3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(uchar x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(uchar2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(uchar4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(uchar8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(uchar16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(uchar3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(uchar x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(uchar2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(uchar4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(uchar8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(uchar16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(uchar3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(uchar x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(uchar2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(uchar4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(uchar8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(uchar16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(uchar3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(uchar x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(uchar2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(uchar4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(uchar8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(uchar16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(uchar3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(uchar x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(uchar2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(uchar4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(uchar8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(uchar16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(uchar3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(uchar x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(uchar2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(uchar4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(uchar8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(uchar16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(uchar3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(uchar x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(uchar2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(uchar4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(uchar8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(uchar16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(uchar3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(uchar x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(uchar2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(uchar4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(uchar8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(uchar16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(uchar3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(short x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(short2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(short4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(short8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(short16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(short3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(short x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(short2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(short4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(short8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(short16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(short3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(short x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(short2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(short4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(short8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(short16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(short3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(short x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(short2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(short4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(short8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(short16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(short3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(short x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(short2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(short4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(short8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(short16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(short3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(short x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(short2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(short4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(short8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(short16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(short3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(short x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(short2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(short4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(short8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(short16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(short3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(short x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(short2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(short4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(short8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(short16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(short3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(short x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(short2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(short4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(short8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(short16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(short3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(short x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(short2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(short4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(short8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(short16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(short3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(short x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(short2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(short4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(short8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(short16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(short3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(ushort x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(ushort2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(ushort4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(ushort8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(ushort16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(ushort3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(ushort x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(ushort2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(ushort4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(ushort8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(ushort16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(ushort3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(ushort x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(ushort2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(ushort4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(ushort8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(ushort16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(ushort3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(ushort x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(ushort2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(ushort4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(ushort8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(ushort16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(ushort3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(ushort x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(ushort2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(ushort4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(ushort8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(ushort16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(ushort3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(ushort x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(ushort2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(ushort4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(ushort8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(ushort16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(ushort3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(ushort x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(ushort2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(ushort4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(ushort8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(ushort16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(ushort3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(ushort x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(ushort2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(ushort4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(ushort8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(ushort16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(ushort3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(ushort x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(ushort2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(ushort4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(ushort8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(ushort16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(ushort3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(ushort x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(ushort2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(ushort4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(ushort8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(ushort16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(ushort3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(ushort x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(ushort2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(ushort4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(ushort8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(ushort16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(ushort3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(int x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(int2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(int4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(int8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(int16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(int3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(int x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(int2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(int4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(int8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(int16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(int3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(int x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(int2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(int4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(int8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(int16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(int3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(int x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(int2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(int4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(int8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(int16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(int3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(int x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(int2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(int4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(int8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(int16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(int3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(int x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(int2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(int4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(int8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(int16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(int3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(int x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(int2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(int4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(int8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(int16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(int3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(int x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(int2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(int4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(int8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(int16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(int3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(int x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(int2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(int4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(int8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(int16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(int3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(int x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(int2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(int4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(int8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(int16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(int3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(int x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(int2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(int4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(int8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(int16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(int3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(uint x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(uint2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(uint4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(uint8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(uint16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(uint3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(uint x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(uint2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(uint4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(uint8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(uint16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(uint3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(uint x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(uint2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(uint4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(uint8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(uint16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(uint3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(uint x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(uint2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(uint4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(uint8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(uint16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(uint3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(uint x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(uint2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(uint4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(uint8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(uint16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(uint3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(uint x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(uint2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(uint4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(uint8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(uint16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(uint3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(uint x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(uint2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(uint4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(uint8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(uint16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(uint3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(uint x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(uint2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(uint4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(uint8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(uint16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(uint3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(uint x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(uint2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(uint4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(uint8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(uint16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(uint3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(uint x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(uint2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(uint4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(uint8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(uint16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(uint3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(uint x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(uint2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(uint4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(uint8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(uint16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(uint3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(long x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(long2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(long4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(long8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(long16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(long3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(long x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(long2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(long4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(long8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(long16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(long3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(long x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(long2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(long4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(long8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(long16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(long3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(long x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(long2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(long4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(long8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(long16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(long3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(long x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(long2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(long4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(long8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(long16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(long3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(long x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(long2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(long4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(long8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(long16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(long3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(long x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(long2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(long4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(long8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(long16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(long3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(long x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(long2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(long4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(long8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(long16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(long3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(long x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(long2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(long4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(long8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(long16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(long3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(long x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(long2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(long4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(long8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(long16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(long3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(long x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(long2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(long4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(long8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(long16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(long3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(ulong x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(ulong2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(ulong4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(ulong8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(ulong16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(ulong3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(ulong x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(ulong2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(ulong4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(ulong8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(ulong16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(ulong3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(ulong x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(ulong2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(ulong4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(ulong8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(ulong16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(ulong3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(ulong x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(ulong2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(ulong4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(ulong8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(ulong16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(ulong3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(ulong x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(ulong2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(ulong4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(ulong8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(ulong16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(ulong3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(ulong x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(ulong2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(ulong4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(ulong8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(ulong16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(ulong3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(ulong x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(ulong2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(ulong4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(ulong8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(ulong16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(ulong3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(ulong x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(ulong2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(ulong4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(ulong8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(ulong16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(ulong3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(ulong x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(ulong2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(ulong4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(ulong8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(ulong16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(ulong3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(ulong x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(ulong2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(ulong4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(ulong8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(ulong16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(ulong3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(ulong x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(ulong2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(ulong4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(ulong8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(ulong16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(ulong3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(half x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(half2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(half4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(half8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(half16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(half3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(half x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(half2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(half4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(half8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(half16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(half3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(half x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(half2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(half4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(half8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(half16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(half3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(half x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(half2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(half4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(half8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(half16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(half3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(half x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(half2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(half4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(half8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(half16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(half3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(half x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(half2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(half4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(half8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(half16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(half3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(half x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(half2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(half4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(half8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(half16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(half3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(half x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(half2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(half4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(half8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(half16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(half3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(half x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(half2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(half4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(half8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(half16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(half3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(half x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(half2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(half4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(half8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(half16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(half3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}

#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(half x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(half2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(half4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(half8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(half16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(half3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(float x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(float2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(float4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(float8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(float16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(float3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(float x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(float2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(float4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(float8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(float16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(float3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(float x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(float2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(float4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(float8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(float16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(float3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(float x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(float2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(float4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(float8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(float16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(float3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(float x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(float2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(float4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(float8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(float16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(float3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(float x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(float2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(float4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(float8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(float16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(float3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(float x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(float2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(float4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(float8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(float16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(float3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(float x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(float2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(float4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(float8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(float16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(float3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(float x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(float2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(float4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(float8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(float16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(float3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(float x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(float2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(float4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(float8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(float16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(float3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}


#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(float x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(float2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(float4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(float8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(float16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(float3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char(double x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2(double2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4(double4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8(double8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16(double16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3(double3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar(double x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2(double2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4(double4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8(double8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16(double16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3(double3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short(double x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2(double2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4(double4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8(double8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16(double16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3(double3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort(double x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2(double2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4(double4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8(double8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16(double16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3(double3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int(double x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2(double2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4(double4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8(double8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16(double16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3(double3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint(double x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2(double2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4(double4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8(double8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16(double16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3(double3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long(double x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2(double2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4(double4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8(double8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16(double16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3(double3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong(double x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2(double2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4(double4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8(double8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16(double16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3(double3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half convert_half(double x)
{
  return (half)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half2 convert_half2(double2 x)
{
  return (half2)(
    (half)x.s0,
    (half)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half4 convert_half4(double4 x)
{
  return (half4)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half8 convert_half8(double8 x)
{
  return (half8)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half16 convert_half16(double16 x)
{
  return (half16)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2,
    (half)x.s3,
    (half)x.s4,
    (half)x.s5,
    (half)x.s6,
    (half)x.s7,
    (half)x.s8,
    (half)x.s9,
    (half)x.sa,
    (half)x.sb,
    (half)x.sc,
    (half)x.sd,
    (half)x.se,
    (half)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
half3 convert_half3(double3 x)
{
  return (half3)(
    (half)x.s0,
    (half)x.s1,
    (half)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float(double x)
{
  return (float)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2(double2 x)
{
  return (float2)(
    (float)x.s0,
    (float)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4(double4 x)
{
  return (float4)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8(double8 x)
{
  return (float8)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16(double16 x)
{
  return (float16)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2,
    (float)x.s3,
    (float)x.s4,
    (float)x.s5,
    (float)x.s6,
    (float)x.s7,
    (float)x.s8,
    (float)x.s9,
    (float)x.sa,
    (float)x.sb,
    (float)x.sc,
    (float)x.sd,
    (float)x.se,
    (float)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3(double3 x)
{
  return (float3)(
    (float)x.s0,
    (float)x.s1,
    (float)x.s2);
}

#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double(double x)
{
  return (double)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2(double2 x)
{
  return (double2)(
    (double)x.s0,
    (double)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4(double4 x)
{
  return (double4)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8(double8 x)
{
  return (double8)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16(double16 x)
{
  return (double16)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2,
    (double)x.s3,
    (double)x.s4,
    (double)x.s5,
    (double)x.s6,
    (double)x.s7,
    (double)x.s8,
    (double)x.s9,
    (double)x.sa,
    (double)x.sb,
    (double)x.sc,
    (double)x.sd,
    (double)x.se,
    (double)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3(double3 x)
{
  return (double3)(
    (double)x.s0,
    (double)x.s1,
    (double)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(char x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(char2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(char4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(char8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(char16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(char3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(char x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(char2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(char4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(char8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(char16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(char3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(char x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(char2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(char4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(char8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(char16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(char3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(char x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(char2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(char4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(char8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(char16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(char3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(char x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(char2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(char4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(char8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(char16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(char3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(char x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(char2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(char4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(char8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(char16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(char3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(char x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(char2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(char4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(char8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(char16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(char3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(char x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(char2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(char4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(char8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(char16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(char3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(char x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(char2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(char4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(char8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(char16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(char3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(char x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(char2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(char4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(char8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(char16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(char3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(char x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(char2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(char4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(char8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(char16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(char3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(char x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(char2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(char4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(char8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(char16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(char3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(char x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(char2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(char4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(char8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(char16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(char3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(char x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(char2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(char4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(char8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(char16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(char3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(char x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(char2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(char4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(char8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(char16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(char3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(char x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(char2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(char4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(char8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(char16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(char3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(char x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(char2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(char4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(char8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(char16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(char3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(char x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(char2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(char4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(char8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(char16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(char3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(char x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(char2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(char4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(char8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(char16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(char3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(char x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(char2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(char4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(char8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(char16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(char3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(char x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(char2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(char4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(char8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(char16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(char3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(char x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(char2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(char4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(char8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(char16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(char3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(char x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(char2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(char4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(char8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(char16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(char3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(char x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(char2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(char4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(char8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(char16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(char3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(char x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(char2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(char4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(char8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(char16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(char3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(char x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(char2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(char4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(char8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(char16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(char3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(char x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(char2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(char4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(char8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(char16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(char3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(char x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(char2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(char4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(char8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(char16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(char3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(char x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(char2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(char4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(char8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(char16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(char3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(char x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(char2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(char4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(char8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(char16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(char3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(char x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(char2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(char4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(char8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(char16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(char3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(char x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(char2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(char4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(char8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(char16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(char3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(uchar x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(uchar2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(uchar4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(uchar8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(uchar16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(uchar3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(uchar x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(uchar2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(uchar4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(uchar8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(uchar16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(uchar3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(uchar x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(uchar2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(uchar4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(uchar8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(uchar16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(uchar3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(uchar x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(uchar2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(uchar4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(uchar8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(uchar16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(uchar3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(uchar x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(uchar2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(uchar4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(uchar8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(uchar16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(uchar3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(uchar x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(uchar2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(uchar4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(uchar8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(uchar16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(uchar3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(uchar x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(uchar2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(uchar4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(uchar8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(uchar16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(uchar3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(uchar x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(uchar2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(uchar4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(uchar8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(uchar16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(uchar3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(uchar x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(uchar2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(uchar4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(uchar8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(uchar16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(uchar3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(uchar x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(uchar2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(uchar4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(uchar8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(uchar16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(uchar3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(uchar x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(uchar2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(uchar4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(uchar8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(uchar16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(uchar3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(uchar x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(uchar2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(uchar4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(uchar8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(uchar16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(uchar3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(uchar x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(uchar2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(uchar4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(uchar8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(uchar16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(uchar3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(uchar x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(uchar2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(uchar4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(uchar8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(uchar16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(uchar3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(uchar x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(uchar2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(uchar4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(uchar8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(uchar16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(uchar3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(uchar x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(uchar2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(uchar4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(uchar8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(uchar16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(uchar3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(uchar x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(uchar2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(uchar4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(uchar8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(uchar16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(uchar3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(uchar x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(uchar2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(uchar4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(uchar8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(uchar16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(uchar3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(uchar x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(uchar2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(uchar4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(uchar8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(uchar16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(uchar3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(uchar x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(uchar2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(uchar4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(uchar8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(uchar16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(uchar3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(uchar x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(uchar2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(uchar4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(uchar8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(uchar16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(uchar3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(uchar x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(uchar2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(uchar4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(uchar8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(uchar16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(uchar3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(uchar x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(uchar2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(uchar4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(uchar8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(uchar16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(uchar3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(uchar x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(uchar2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(uchar4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(uchar8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(uchar16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(uchar3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(uchar x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(uchar2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(uchar4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(uchar8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(uchar16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(uchar3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(uchar x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(uchar2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(uchar4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(uchar8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(uchar16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(uchar3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(uchar x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(uchar2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(uchar4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(uchar8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(uchar16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(uchar3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(uchar x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(uchar2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(uchar4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(uchar8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(uchar16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(uchar3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(uchar x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(uchar2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(uchar4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(uchar8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(uchar16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(uchar3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(uchar x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(uchar2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(uchar4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(uchar8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(uchar16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(uchar3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(uchar x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(uchar2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(uchar4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(uchar8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(uchar16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(uchar3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(uchar x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(uchar2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(uchar4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(uchar8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(uchar16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(uchar3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(short x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(short2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(short4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(short8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(short16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(short3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(short x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(short2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(short4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(short8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(short16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(short3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(short x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(short2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(short4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(short8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(short16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(short3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(short x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(short2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(short4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(short8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(short16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(short3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(short x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(short2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(short4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(short8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(short16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(short3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(short x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(short2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(short4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(short8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(short16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(short3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(short x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(short2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(short4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(short8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(short16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(short3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(short x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(short2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(short4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(short8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(short16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(short3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(short x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(short2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(short4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(short8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(short16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(short3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(short x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(short2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(short4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(short8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(short16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(short3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(short x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(short2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(short4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(short8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(short16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(short3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(short x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(short2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(short4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(short8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(short16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(short3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(short x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(short2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(short4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(short8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(short16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(short3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(short x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(short2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(short4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(short8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(short16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(short3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(short x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(short2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(short4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(short8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(short16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(short3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(short x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(short2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(short4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(short8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(short16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(short3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(short x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(short2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(short4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(short8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(short16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(short3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(short x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(short2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(short4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(short8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(short16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(short3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(short x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(short2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(short4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(short8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(short16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(short3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(short x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(short2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(short4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(short8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(short16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(short3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(short x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(short2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(short4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(short8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(short16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(short3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(short x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(short2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(short4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(short8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(short16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(short3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(short x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(short2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(short4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(short8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(short16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(short3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(short x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(short2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(short4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(short8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(short16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(short3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(short x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(short2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(short4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(short8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(short16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(short3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(short x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(short2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(short4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(short8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(short16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(short3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(short x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(short2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(short4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(short8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(short16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(short3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(short x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(short2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(short4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(short8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(short16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(short3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(short x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(short2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(short4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(short8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(short16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(short3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(short x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(short2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(short4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(short8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(short16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(short3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(short x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(short2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(short4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(short8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(short16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(short3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(short x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(short2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(short4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(short8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(short16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(short3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(ushort x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(ushort2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(ushort4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(ushort8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(ushort16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(ushort3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(ushort x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(ushort2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(ushort4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(ushort8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(ushort16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(ushort3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(ushort x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(ushort2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(ushort4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(ushort8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(ushort16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(ushort3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(ushort x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(ushort2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(ushort4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(ushort8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(ushort16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(ushort3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(ushort x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(ushort2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(ushort4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(ushort8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(ushort16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(ushort3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(ushort x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(ushort2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(ushort4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(ushort8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(ushort16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(ushort3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(ushort x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(ushort2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(ushort4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(ushort8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(ushort16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(ushort3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(ushort x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(ushort2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(ushort4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(ushort8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(ushort16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(ushort3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(ushort x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(ushort2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(ushort4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(ushort8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(ushort16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(ushort3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(ushort x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(ushort2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(ushort4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(ushort8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(ushort16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(ushort3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(ushort x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(ushort2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(ushort4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(ushort8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(ushort16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(ushort3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(ushort x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(ushort2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(ushort4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(ushort8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(ushort16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(ushort3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(ushort x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(ushort2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(ushort4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(ushort8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(ushort16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(ushort3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(ushort x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(ushort2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(ushort4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(ushort8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(ushort16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(ushort3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(ushort x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(ushort2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(ushort4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(ushort8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(ushort16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(ushort3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(ushort x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(ushort2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(ushort4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(ushort8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(ushort16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(ushort3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(ushort x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(ushort2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(ushort4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(ushort8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(ushort16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(ushort3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(ushort x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(ushort2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(ushort4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(ushort8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(ushort16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(ushort3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(ushort x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(ushort2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(ushort4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(ushort8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(ushort16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(ushort3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(ushort x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(ushort2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(ushort4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(ushort8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(ushort16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(ushort3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(ushort x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(ushort2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(ushort4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(ushort8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(ushort16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(ushort3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(ushort x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(ushort2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(ushort4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(ushort8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(ushort16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(ushort3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(ushort x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(ushort2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(ushort4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(ushort8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(ushort16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(ushort3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(ushort x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(ushort2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(ushort4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(ushort8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(ushort16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(ushort3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(ushort x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(ushort2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(ushort4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(ushort8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(ushort16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(ushort3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(ushort x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(ushort2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(ushort4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(ushort8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(ushort16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(ushort3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(ushort x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(ushort2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(ushort4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(ushort8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(ushort16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(ushort3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(ushort x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(ushort2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(ushort4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(ushort8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(ushort16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(ushort3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(ushort x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(ushort2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(ushort4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(ushort8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(ushort16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(ushort3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(ushort x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(ushort2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(ushort4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(ushort8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(ushort16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(ushort3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(ushort x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(ushort2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(ushort4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(ushort8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(ushort16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(ushort3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(ushort x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(ushort2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(ushort4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(ushort8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(ushort16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(ushort3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(int x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(int2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(int4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(int8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(int16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(int3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(int x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(int2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(int4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(int8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(int16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(int3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(int x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(int2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(int4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(int8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(int16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(int3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(int x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(int2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(int4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(int8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(int16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(int3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(int x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(int2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(int4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(int8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(int16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(int3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(int x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(int2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(int4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(int8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(int16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(int3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(int x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(int2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(int4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(int8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(int16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(int3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(int x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(int2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(int4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(int8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(int16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(int3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(int x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(int2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(int4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(int8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(int16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(int3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(int x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(int2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(int4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(int8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(int16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(int3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(int x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(int2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(int4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(int8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(int16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(int3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(int x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(int2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(int4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(int8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(int16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(int3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(int x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(int2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(int4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(int8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(int16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(int3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(int x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(int2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(int4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(int8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(int16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(int3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(int x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(int2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(int4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(int8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(int16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(int3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(int x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(int2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(int4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(int8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(int16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(int3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(int x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(int2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(int4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(int8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(int16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(int3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(int x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(int2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(int4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(int8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(int16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(int3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(int x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(int2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(int4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(int8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(int16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(int3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(int x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(int2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(int4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(int8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(int16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(int3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(int x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(int2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(int4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(int8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(int16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(int3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(int x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(int2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(int4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(int8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(int16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(int3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(int x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(int2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(int4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(int8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(int16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(int3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(int x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(int2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(int4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(int8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(int16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(int3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(int x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(int2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(int4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(int8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(int16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(int3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(int x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(int2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(int4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(int8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(int16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(int3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(int x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(int2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(int4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(int8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(int16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(int3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(int x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(int2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(int4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(int8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(int16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(int3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(int x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(int2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(int4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(int8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(int16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(int3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(int x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(int2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(int4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(int8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(int16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(int3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(int x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(int2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(int4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(int8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(int16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(int3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(int x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(int2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(int4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(int8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(int16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(int3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(uint x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(uint2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(uint4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(uint8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(uint16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(uint3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(uint x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(uint2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(uint4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(uint8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(uint16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(uint3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(uint x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(uint2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(uint4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(uint8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(uint16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(uint3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(uint x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(uint2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(uint4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(uint8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(uint16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(uint3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(uint x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(uint2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(uint4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(uint8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(uint16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(uint3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(uint x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(uint2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(uint4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(uint8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(uint16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(uint3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(uint x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(uint2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(uint4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(uint8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(uint16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(uint3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(uint x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(uint2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(uint4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(uint8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(uint16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(uint3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(uint x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(uint2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(uint4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(uint8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(uint16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(uint3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(uint x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(uint2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(uint4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(uint8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(uint16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(uint3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(uint x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(uint2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(uint4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(uint8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(uint16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(uint3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(uint x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(uint2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(uint4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(uint8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(uint16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(uint3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(uint x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(uint2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(uint4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(uint8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(uint16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(uint3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(uint x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(uint2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(uint4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(uint8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(uint16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(uint3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(uint x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(uint2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(uint4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(uint8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(uint16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(uint3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(uint x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(uint2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(uint4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(uint8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(uint16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(uint3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(uint x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(uint2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(uint4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(uint8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(uint16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(uint3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(uint x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(uint2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(uint4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(uint8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(uint16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(uint3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(uint x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(uint2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(uint4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(uint8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(uint16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(uint3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(uint x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(uint2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(uint4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(uint8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(uint16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(uint3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(uint x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(uint2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(uint4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(uint8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(uint16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(uint3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(uint x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(uint2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(uint4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(uint8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(uint16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(uint3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(uint x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(uint2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(uint4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(uint8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(uint16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(uint3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(uint x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(uint2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(uint4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(uint8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(uint16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(uint3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(uint x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(uint2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(uint4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(uint8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(uint16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(uint3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(uint x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(uint2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(uint4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(uint8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(uint16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(uint3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(uint x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(uint2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(uint4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(uint8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(uint16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(uint3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(uint x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(uint2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(uint4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(uint8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(uint16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(uint3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(uint x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(uint2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(uint4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(uint8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(uint16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(uint3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(uint x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(uint2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(uint4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(uint8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(uint16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(uint3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(uint x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(uint2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(uint4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(uint8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(uint16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(uint3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(uint x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(uint2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(uint4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(uint8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(uint16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(uint3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(long x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(long2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(long4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(long8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(long16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(long3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(long x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(long2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(long4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(long8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(long16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(long3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(long x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(long2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(long4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(long8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(long16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(long3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(long x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(long2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(long4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(long8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(long16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(long3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(long x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(long2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(long4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(long8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(long16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(long3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(long x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(long2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(long4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(long8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(long16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(long3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(long x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(long2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(long4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(long8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(long16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(long3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(long x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(long2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(long4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(long8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(long16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(long3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(long x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(long2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(long4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(long8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(long16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(long3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(long x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(long2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(long4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(long8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(long16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(long3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(long x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(long2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(long4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(long8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(long16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(long3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(long x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(long2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(long4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(long8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(long16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(long3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(long x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(long2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(long4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(long8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(long16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(long3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(long x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(long2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(long4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(long8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(long16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(long3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(long x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(long2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(long4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(long8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(long16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(long3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(long x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(long2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(long4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(long8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(long16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(long3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(long x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(long2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(long4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(long8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(long16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(long3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(long x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(long2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(long4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(long8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(long16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(long3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(long x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(long2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(long4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(long8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(long16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(long3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(long x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(long2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(long4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(long8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(long16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(long3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(long x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(long2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(long4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(long8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(long16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(long3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(long x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(long2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(long4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(long8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(long16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(long3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(long x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(long2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(long4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(long8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(long16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(long3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(long x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(long2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(long4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(long8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(long16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(long3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(long x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(long2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(long4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(long8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(long16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(long3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(long x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(long2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(long4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(long8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(long16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(long3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(long x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(long2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(long4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(long8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(long16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(long3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(long x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(long2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(long4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(long8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(long16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(long3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(long x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(long2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(long4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(long8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(long16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(long3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(long x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(long2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(long4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(long8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(long16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(long3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(long x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(long2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(long4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(long8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(long16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(long3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(long x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(long2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(long4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(long8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(long16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(long3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(ulong x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(ulong2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(ulong4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(ulong8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(ulong16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(ulong3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(ulong x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(ulong2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(ulong4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(ulong8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(ulong16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(ulong3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(ulong x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(ulong2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(ulong4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(ulong8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(ulong16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(ulong3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(ulong x)
{
  return (char)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(ulong2 x)
{
  return (char2)(
    (char)x.s0,
    (char)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(ulong4 x)
{
  return (char4)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(ulong8 x)
{
  return (char8)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(ulong16 x)
{
  return (char16)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2,
    (char)x.s3,
    (char)x.s4,
    (char)x.s5,
    (char)x.s6,
    (char)x.s7,
    (char)x.s8,
    (char)x.s9,
    (char)x.sa,
    (char)x.sb,
    (char)x.sc,
    (char)x.sd,
    (char)x.se,
    (char)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(ulong3 x)
{
  return (char3)(
    (char)x.s0,
    (char)x.s1,
    (char)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(ulong x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(ulong2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(ulong4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(ulong8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(ulong16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(ulong3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(ulong x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(ulong2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(ulong4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(ulong8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(ulong16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(ulong3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(ulong x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(ulong2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(ulong4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(ulong8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(ulong16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(ulong3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(ulong x)
{
  return (uchar)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(ulong2 x)
{
  return (uchar2)(
    (uchar)x.s0,
    (uchar)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(ulong4 x)
{
  return (uchar4)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(ulong8 x)
{
  return (uchar8)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(ulong16 x)
{
  return (uchar16)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2,
    (uchar)x.s3,
    (uchar)x.s4,
    (uchar)x.s5,
    (uchar)x.s6,
    (uchar)x.s7,
    (uchar)x.s8,
    (uchar)x.s9,
    (uchar)x.sa,
    (uchar)x.sb,
    (uchar)x.sc,
    (uchar)x.sd,
    (uchar)x.se,
    (uchar)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(ulong3 x)
{
  return (uchar3)(
    (uchar)x.s0,
    (uchar)x.s1,
    (uchar)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(ulong x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(ulong2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(ulong4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(ulong8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(ulong16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(ulong3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(ulong x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(ulong2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(ulong4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(ulong8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(ulong16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(ulong3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(ulong x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(ulong2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(ulong4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(ulong8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(ulong16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(ulong3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(ulong x)
{
  return (short)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(ulong2 x)
{
  return (short2)(
    (short)x.s0,
    (short)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(ulong4 x)
{
  return (short4)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(ulong8 x)
{
  return (short8)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(ulong16 x)
{
  return (short16)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2,
    (short)x.s3,
    (short)x.s4,
    (short)x.s5,
    (short)x.s6,
    (short)x.s7,
    (short)x.s8,
    (short)x.s9,
    (short)x.sa,
    (short)x.sb,
    (short)x.sc,
    (short)x.sd,
    (short)x.se,
    (short)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(ulong3 x)
{
  return (short3)(
    (short)x.s0,
    (short)x.s1,
    (short)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(ulong x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(ulong2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(ulong4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(ulong8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(ulong16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(ulong3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(ulong x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(ulong2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(ulong4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(ulong8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(ulong16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(ulong3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(ulong x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(ulong2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(ulong4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(ulong8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(ulong16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(ulong3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(ulong x)
{
  return (ushort)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(ulong2 x)
{
  return (ushort2)(
    (ushort)x.s0,
    (ushort)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(ulong4 x)
{
  return (ushort4)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(ulong8 x)
{
  return (ushort8)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(ulong16 x)
{
  return (ushort16)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2,
    (ushort)x.s3,
    (ushort)x.s4,
    (ushort)x.s5,
    (ushort)x.s6,
    (ushort)x.s7,
    (ushort)x.s8,
    (ushort)x.s9,
    (ushort)x.sa,
    (ushort)x.sb,
    (ushort)x.sc,
    (ushort)x.sd,
    (ushort)x.se,
    (ushort)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(ulong3 x)
{
  return (ushort3)(
    (ushort)x.s0,
    (ushort)x.s1,
    (ushort)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(ulong x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(ulong2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(ulong4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(ulong8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(ulong16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(ulong3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(ulong x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(ulong2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(ulong4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(ulong8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(ulong16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(ulong3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(ulong x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(ulong2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(ulong4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(ulong8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(ulong16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(ulong3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(ulong x)
{
  return (int)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(ulong2 x)
{
  return (int2)(
    (int)x.s0,
    (int)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(ulong4 x)
{
  return (int4)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(ulong8 x)
{
  return (int8)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(ulong16 x)
{
  return (int16)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2,
    (int)x.s3,
    (int)x.s4,
    (int)x.s5,
    (int)x.s6,
    (int)x.s7,
    (int)x.s8,
    (int)x.s9,
    (int)x.sa,
    (int)x.sb,
    (int)x.sc,
    (int)x.sd,
    (int)x.se,
    (int)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(ulong3 x)
{
  return (int3)(
    (int)x.s0,
    (int)x.s1,
    (int)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(ulong x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(ulong2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(ulong4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(ulong8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(ulong16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(ulong3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(ulong x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(ulong2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(ulong4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(ulong8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(ulong16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(ulong3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(ulong x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(ulong2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(ulong4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(ulong8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(ulong16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(ulong3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(ulong x)
{
  return (uint)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(ulong2 x)
{
  return (uint2)(
    (uint)x.s0,
    (uint)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(ulong4 x)
{
  return (uint4)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(ulong8 x)
{
  return (uint8)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(ulong16 x)
{
  return (uint16)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2,
    (uint)x.s3,
    (uint)x.s4,
    (uint)x.s5,
    (uint)x.s6,
    (uint)x.s7,
    (uint)x.s8,
    (uint)x.s9,
    (uint)x.sa,
    (uint)x.sb,
    (uint)x.sc,
    (uint)x.sd,
    (uint)x.se,
    (uint)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(ulong3 x)
{
  return (uint3)(
    (uint)x.s0,
    (uint)x.s1,
    (uint)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(ulong x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(ulong2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(ulong4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(ulong8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(ulong16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(ulong3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(ulong x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(ulong2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(ulong4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(ulong8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(ulong16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(ulong3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(ulong x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(ulong2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(ulong4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(ulong8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(ulong16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(ulong3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(ulong x)
{
  return (long)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(ulong2 x)
{
  return (long2)(
    (long)x.s0,
    (long)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(ulong4 x)
{
  return (long4)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(ulong8 x)
{
  return (long8)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(ulong16 x)
{
  return (long16)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2,
    (long)x.s3,
    (long)x.s4,
    (long)x.s5,
    (long)x.s6,
    (long)x.s7,
    (long)x.s8,
    (long)x.s9,
    (long)x.sa,
    (long)x.sb,
    (long)x.sc,
    (long)x.sd,
    (long)x.se,
    (long)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(ulong3 x)
{
  return (long3)(
    (long)x.s0,
    (long)x.s1,
    (long)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(ulong x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(ulong2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(ulong4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(ulong8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(ulong16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(ulong3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(ulong x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(ulong2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(ulong4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(ulong8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(ulong16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(ulong3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(ulong x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(ulong2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(ulong4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(ulong8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(ulong16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(ulong3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(ulong x)
{
  return (ulong)x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(ulong2 x)
{
  return (ulong2)(
    (ulong)x.s0,
    (ulong)x.s1);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(ulong4 x)
{
  return (ulong4)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(ulong8 x)
{
  return (ulong8)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(ulong16 x)
{
  return (ulong16)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2,
    (ulong)x.s3,
    (ulong)x.s4,
    (ulong)x.s5,
    (ulong)x.s6,
    (ulong)x.s7,
    (ulong)x.s8,
    (ulong)x.s9,
    (ulong)x.sa,
    (ulong)x.sb,
    (ulong)x.sc,
    (ulong)x.sd,
    (ulong)x.se,
    (ulong)x.sf);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(ulong3 x)
{
  return (ulong3)(
    (ulong)x.s0,
    (ulong)x.s1,
    (ulong)x.s2);
}

#endif


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(char x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(char2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(char3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(char4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(char8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(char16 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(char x)
{
  x = max(x, (char)0);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(char2 x)
{
  x = max(x, (char)0);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(char3 x)
{
  x = max(x, (char)0);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(char4 x)
{
  x = max(x, (char)0);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(char8 x)
{
  x = max(x, (char)0);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(char16 x)
{
  x = max(x, (char)0);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(char x)
{
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(char2 x)
{
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(char3 x)
{
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(char4 x)
{
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(char8 x)
{
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(char16 x)
{
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(char x)
{
  x = max(x, (char)0);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(char2 x)
{
  x = max(x, (char)0);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(char3 x)
{
  x = max(x, (char)0);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(char4 x)
{
  x = max(x, (char)0);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(char8 x)
{
  x = max(x, (char)0);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(char16 x)
{
  x = max(x, (char)0);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(char x)
{
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(char2 x)
{
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(char3 x)
{
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(char4 x)
{
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(char8 x)
{
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(char16 x)
{
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(char x)
{
  x = max(x, (char)0);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(char2 x)
{
  x = max(x, (char)0);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(char3 x)
{
  x = max(x, (char)0);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(char4 x)
{
  x = max(x, (char)0);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(char8 x)
{
  x = max(x, (char)0);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(char16 x)
{
  x = max(x, (char)0);
  return convert_uint16(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(char x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(char2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(char3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(char4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(char8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(char16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(char x)
{
  x = max(x, (char)0);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(char2 x)
{
  x = max(x, (char)0);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(char3 x)
{
  x = max(x, (char)0);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(char4 x)
{
  x = max(x, (char)0);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(char8 x)
{
  x = max(x, (char)0);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(char16 x)
{
  x = max(x, (char)0);
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(uchar x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(uchar2 x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(uchar3 x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(uchar4 x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(uchar8 x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(uchar16 x)
{
  x = min(x, (uchar)CHAR_MAX);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(uchar x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(uchar2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(uchar3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(uchar4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(uchar8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(uchar16 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(uchar x)
{
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(uchar2 x)
{
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(uchar3 x)
{
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(uchar4 x)
{
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(uchar8 x)
{
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(uchar16 x)
{
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(uchar x)
{
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(uchar2 x)
{
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(uchar3 x)
{
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(uchar4 x)
{
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(uchar8 x)
{
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(uchar16 x)
{
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(uchar x)
{
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(uchar2 x)
{
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(uchar3 x)
{
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(uchar4 x)
{
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(uchar8 x)
{
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(uchar16 x)
{
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(uchar x)
{
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(uchar2 x)
{
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(uchar3 x)
{
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(uchar4 x)
{
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(uchar8 x)
{
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(uchar16 x)
{
  return convert_uint16(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(uchar x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(uchar2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(uchar3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(uchar4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(uchar8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(uchar16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(uchar x)
{
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(uchar2 x)
{
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(uchar3 x)
{
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(uchar4 x)
{
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(uchar8 x)
{
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(uchar16 x)
{
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(short x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(short2 x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(short3 x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(short4 x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(short8 x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(short16 x)
{
  x = clamp(x, (short)CHAR_MIN, (short)CHAR_MAX);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(short x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(short2 x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(short3 x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(short4 x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(short8 x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(short16 x)
{
  x = clamp(x, (short)0, (short)UCHAR_MAX);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(short x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(short2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(short3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(short4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(short8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(short16 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(short x)
{
  x = max(x, (short)0);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(short2 x)
{
  x = max(x, (short)0);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(short3 x)
{
  x = max(x, (short)0);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(short4 x)
{
  x = max(x, (short)0);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(short8 x)
{
  x = max(x, (short)0);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(short16 x)
{
  x = max(x, (short)0);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(short x)
{
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(short2 x)
{
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(short3 x)
{
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(short4 x)
{
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(short8 x)
{
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(short16 x)
{
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(short x)
{
  x = max(x, (short)0);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(short2 x)
{
  x = max(x, (short)0);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(short3 x)
{
  x = max(x, (short)0);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(short4 x)
{
  x = max(x, (short)0);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(short8 x)
{
  x = max(x, (short)0);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(short16 x)
{
  x = max(x, (short)0);
  return convert_uint16(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(short x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(short2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(short3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(short4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(short8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(short16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(short x)
{
  x = max(x, (short)0);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(short2 x)
{
  x = max(x, (short)0);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(short3 x)
{
  x = max(x, (short)0);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(short4 x)
{
  x = max(x, (short)0);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(short8 x)
{
  x = max(x, (short)0);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(short16 x)
{
  x = max(x, (short)0);
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(ushort x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(ushort2 x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(ushort3 x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(ushort4 x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(ushort8 x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(ushort16 x)
{
  x = min(x, (ushort)CHAR_MAX);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(ushort x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(ushort2 x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(ushort3 x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(ushort4 x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(ushort8 x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(ushort16 x)
{
  x = min(x, (ushort)UCHAR_MAX);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(ushort x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(ushort2 x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(ushort3 x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(ushort4 x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(ushort8 x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(ushort16 x)
{
  x = min(x, (ushort)SHRT_MAX);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(ushort x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(ushort2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(ushort3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(ushort4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(ushort8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(ushort16 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(ushort x)
{
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(ushort2 x)
{
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(ushort3 x)
{
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(ushort4 x)
{
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(ushort8 x)
{
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(ushort16 x)
{
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(ushort x)
{
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(ushort2 x)
{
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(ushort3 x)
{
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(ushort4 x)
{
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(ushort8 x)
{
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(ushort16 x)
{
  return convert_uint16(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(ushort x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(ushort2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(ushort3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(ushort4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(ushort8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(ushort16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(ushort x)
{
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(ushort2 x)
{
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(ushort3 x)
{
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(ushort4 x)
{
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(ushort8 x)
{
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(ushort16 x)
{
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(int x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(int2 x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(int3 x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(int4 x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(int8 x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(int16 x)
{
  x = clamp(x, (int)CHAR_MIN, (int)CHAR_MAX);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(int x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(int2 x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(int3 x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(int4 x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(int8 x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(int16 x)
{
  x = clamp(x, (int)0, (int)UCHAR_MAX);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(int x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(int2 x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(int3 x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(int4 x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(int8 x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(int16 x)
{
  x = clamp(x, (int)SHRT_MIN, (int)SHRT_MAX);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(int x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(int2 x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(int3 x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(int4 x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(int8 x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(int16 x)
{
  x = clamp(x, (int)0, (int)USHRT_MAX);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(int x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(int2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(int3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(int4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(int8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(int16 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(int x)
{
  x = max(x, (int)0);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(int2 x)
{
  x = max(x, (int)0);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(int3 x)
{
  x = max(x, (int)0);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(int4 x)
{
  x = max(x, (int)0);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(int8 x)
{
  x = max(x, (int)0);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(int16 x)
{
  x = max(x, (int)0);
  return convert_uint16(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(int x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(int2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(int3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(int4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(int8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(int16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(int x)
{
  x = max(x, (int)0);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(int2 x)
{
  x = max(x, (int)0);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(int3 x)
{
  x = max(x, (int)0);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(int4 x)
{
  x = max(x, (int)0);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(int8 x)
{
  x = max(x, (int)0);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(int16 x)
{
  x = max(x, (int)0);
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(uint x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(uint2 x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(uint3 x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(uint4 x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(uint8 x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(uint16 x)
{
  x = min(x, (uint)CHAR_MAX);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(uint x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(uint2 x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(uint3 x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(uint4 x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(uint8 x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(uint16 x)
{
  x = min(x, (uint)UCHAR_MAX);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(uint x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(uint2 x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(uint3 x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(uint4 x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(uint8 x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(uint16 x)
{
  x = min(x, (uint)SHRT_MAX);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(uint x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(uint2 x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(uint3 x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(uint4 x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(uint8 x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(uint16 x)
{
  x = min(x, (uint)USHRT_MAX);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(uint x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(uint2 x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(uint3 x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(uint4 x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(uint8 x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(uint16 x)
{
  x = min(x, (uint)INT_MAX);
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(uint x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(uint2 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(uint3 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(uint4 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(uint8 x)
{
  return x;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(uint16 x)
{
  return x;
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(uint x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(uint2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(uint3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(uint4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(uint8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(uint16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(uint x)
{
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(uint2 x)
{
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(uint3 x)
{
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(uint4 x)
{
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(uint8 x)
{
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(uint16 x)
{
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(long x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(long2 x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(long3 x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(long4 x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(long8 x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(long16 x)
{
  x = clamp(x, (long)CHAR_MIN, (long)CHAR_MAX);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(long x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(long2 x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(long3 x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(long4 x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(long8 x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(long16 x)
{
  x = clamp(x, (long)0, (long)UCHAR_MAX);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(long x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(long2 x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(long3 x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(long4 x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(long8 x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(long16 x)
{
  x = clamp(x, (long)SHRT_MIN, (long)SHRT_MAX);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(long x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(long2 x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(long3 x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(long4 x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(long8 x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(long16 x)
{
  x = clamp(x, (long)0, (long)USHRT_MAX);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(long x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(long2 x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(long3 x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(long4 x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(long8 x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(long16 x)
{
  x = clamp(x, (long)INT_MIN, (long)INT_MAX);
  return convert_int16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(long x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(long2 x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(long3 x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(long4 x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(long8 x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(long16 x)
{
  x = clamp(x, (long)0, (long)UINT_MAX);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(long x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(long2 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(long3 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(long4 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(long8 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(long16 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(long x)
{
  x = max(x, (long)0);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(long2 x)
{
  x = max(x, (long)0);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(long3 x)
{
  x = max(x, (long)0);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(long4 x)
{
  x = max(x, (long)0);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(long8 x)
{
  x = max(x, (long)0);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(long16 x)
{
  x = max(x, (long)0);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(ulong x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(ulong2 x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(ulong3 x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(ulong4 x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(ulong8 x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(ulong16 x)
{
  x = min(x, (ulong)CHAR_MAX);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(ulong x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(ulong2 x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(ulong3 x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(ulong4 x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(ulong8 x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(ulong16 x)
{
  x = min(x, (ulong)UCHAR_MAX);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(ulong x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(ulong2 x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(ulong3 x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(ulong4 x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(ulong8 x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(ulong16 x)
{
  x = min(x, (ulong)SHRT_MAX);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(ulong x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(ulong2 x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(ulong3 x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(ulong4 x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(ulong8 x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(ulong16 x)
{
  x = min(x, (ulong)USHRT_MAX);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(ulong x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(ulong2 x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(ulong3 x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(ulong4 x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(ulong8 x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(ulong16 x)
{
  x = min(x, (ulong)INT_MAX);
  return convert_int16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(ulong x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(ulong2 x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(ulong3 x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(ulong4 x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(ulong8 x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(ulong16 x)
{
  x = min(x, (ulong)UINT_MAX);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(ulong x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(ulong2 x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(ulong3 x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(ulong4 x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(ulong8 x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(ulong16 x)
{
  x = min(x, (ulong)LONG_MAX);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(ulong x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(ulong2 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(ulong3 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(ulong4 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(ulong8 x)
{
  return x;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(ulong16 x)
{
  return x;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(half2 x)
{
  x = clamp(x, (half)CHAR_MIN, (half)CHAR_MAX);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(half3 x)
{
  x = clamp(x, (half)CHAR_MIN, (half)CHAR_MAX);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(half4 x)
{
  x = clamp(x, (half)CHAR_MIN, (half)CHAR_MAX);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(half8 x)
{
  x = clamp(x, (half)CHAR_MIN, (half)CHAR_MAX);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(half16 x)
{
  x = clamp(x, (half)CHAR_MIN, (half)CHAR_MAX);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(half2 x)
{
  x = clamp(x, (half)0, (half)UCHAR_MAX);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(half3 x)
{
  x = clamp(x, (half)0, (half)UCHAR_MAX);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(half4 x)
{
  x = clamp(x, (half)0, (half)UCHAR_MAX);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(half8 x)
{
  x = clamp(x, (half)0, (half)UCHAR_MAX);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(half16 x)
{
  x = clamp(x, (half)0, (half)UCHAR_MAX);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(half2 x)
{
  x = max(x, (half)0);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(half3 x)
{
  x = max(x, (half)0);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(half4 x)
{
  x = max(x, (half)0);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(half8 x)
{
  x = max(x, (half)0);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(half16 x)
{
  x = max(x, (half)0);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(half2 x)
{
  x = max(x, (half)0);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(half3 x)
{
  x = max(x, (half)0);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(half4 x)
{
  x = max(x, (half)0);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(half8 x)
{
  x = max(x, (half)0);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(half16 x)
{
  x = max(x, (half)0);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(half2 x)
{
  return convert_int2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(half3 x)
{
  return convert_int3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(half4 x)
{
  return convert_int4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(half8 x)
{
  return convert_int8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(half16 x)
{
  return convert_int16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(half2 x)
{
  x = max(x, (half)0);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(half3 x)
{
  x = max(x, (half)0);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(half4 x)
{
  x = max(x, (half)0);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(half8 x)
{
  x = max(x, (half)0);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(half16 x)
{
  x = max(x, (half)0);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(half2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(half3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(half4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(half8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(half16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(half2 x)
{
  x = max(x, (half)0);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(half3 x)
{
  x = max(x, (half)0);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(half4 x)
{
  x = max(x, (half)0);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(half8 x)
{
  x = max(x, (half)0);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(half16 x)
{
  x = max(x, (half)0);
  return convert_ulong16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(float x)
{
  char y = convert_char(x);
  y = select(y, (char)CHAR_MIN, convert_char(x < (float)(-0x1p+7f)));
  y = select(y, (char)CHAR_MAX, convert_char(x >= (float)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(float2 x)
{
  char2 y = convert_char2(x);
  y = select(y, (char2)CHAR_MIN, convert_char2(x < (float2)(-0x1p+7f)));
  y = select(y, (char2)CHAR_MAX, convert_char2(x >= (float2)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(float3 x)
{
  char3 y = convert_char3(x);
  y = select(y, (char3)CHAR_MIN, convert_char3(x < (float3)(-0x1p+7f)));
  y = select(y, (char3)CHAR_MAX, convert_char3(x >= (float3)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(float4 x)
{
  char4 y = convert_char4(x);
  y = select(y, (char4)CHAR_MIN, convert_char4(x < (float4)(-0x1p+7f)));
  y = select(y, (char4)CHAR_MAX, convert_char4(x >= (float4)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(float8 x)
{
  char8 y = convert_char8(x);
  y = select(y, (char8)CHAR_MIN, convert_char8(x < (float8)(-0x1p+7f)));
  y = select(y, (char8)CHAR_MAX, convert_char8(x >= (float8)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(float16 x)
{
  char16 y = convert_char16(x);
  y = select(y, (char16)CHAR_MIN, convert_char16(x < (float16)(-0x1p+7f)));
  y = select(y, (char16)CHAR_MAX, convert_char16(x >= (float16)(0x1p+7f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(float x)
{
  uchar y = convert_uchar(x);
  y = select(y, (uchar)0, as_uchar(convert_char(x < (float)0.0f)));
  y = select(y, (uchar)UCHAR_MAX, as_uchar(convert_char(x >= (float)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(float2 x)
{
  uchar2 y = convert_uchar2(x);
  y = select(y, (uchar2)0, as_uchar2(convert_char2(x < (float2)0.0f)));
  y = select(y, (uchar2)UCHAR_MAX, as_uchar2(convert_char2(x >= (float2)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(float3 x)
{
  uchar3 y = convert_uchar3(x);
  y = select(y, (uchar3)0, as_uchar3(convert_char3(x < (float3)0.0f)));
  y = select(y, (uchar3)UCHAR_MAX, as_uchar3(convert_char3(x >= (float3)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(float4 x)
{
  uchar4 y = convert_uchar4(x);
  y = select(y, (uchar4)0, as_uchar4(convert_char4(x < (float4)0.0f)));
  y = select(y, (uchar4)UCHAR_MAX, as_uchar4(convert_char4(x >= (float4)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(float8 x)
{
  uchar8 y = convert_uchar8(x);
  y = select(y, (uchar8)0, as_uchar8(convert_char8(x < (float8)0.0f)));
  y = select(y, (uchar8)UCHAR_MAX, as_uchar8(convert_char8(x >= (float8)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(float16 x)
{
  uchar16 y = convert_uchar16(x);
  y = select(y, (uchar16)0, as_uchar16(convert_char16(x < (float16)0.0f)));
  y = select(y, (uchar16)UCHAR_MAX, as_uchar16(convert_char16(x >= (float16)(0x1p+8f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(float x)
{
  short y = convert_short(x);
  y = select(y, (short)SHRT_MIN, convert_short(x < (float)(-0x1p+15f)));
  y = select(y, (short)SHRT_MAX, convert_short(x >= (float)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(float2 x)
{
  short2 y = convert_short2(x);
  y = select(y, (short2)SHRT_MIN, convert_short2(x < (float2)(-0x1p+15f)));
  y = select(y, (short2)SHRT_MAX, convert_short2(x >= (float2)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(float3 x)
{
  short3 y = convert_short3(x);
  y = select(y, (short3)SHRT_MIN, convert_short3(x < (float3)(-0x1p+15f)));
  y = select(y, (short3)SHRT_MAX, convert_short3(x >= (float3)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(float4 x)
{
  short4 y = convert_short4(x);
  y = select(y, (short4)SHRT_MIN, convert_short4(x < (float4)(-0x1p+15f)));
  y = select(y, (short4)SHRT_MAX, convert_short4(x >= (float4)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(float8 x)
{
  short8 y = convert_short8(x);
  y = select(y, (short8)SHRT_MIN, convert_short8(x < (float8)(-0x1p+15f)));
  y = select(y, (short8)SHRT_MAX, convert_short8(x >= (float8)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(float16 x)
{
  short16 y = convert_short16(x);
  y = select(y, (short16)SHRT_MIN, convert_short16(x < (float16)(-0x1p+15f)));
  y = select(y, (short16)SHRT_MAX, convert_short16(x >= (float16)(0x1p+15f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(float x)
{
  ushort y = convert_ushort(x);
  y = select(y, (ushort)0, as_ushort(convert_short(x < (float)0.0f)));
  y = select(y, (ushort)USHRT_MAX, as_ushort(convert_short(x >= (float)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(float2 x)
{
  ushort2 y = convert_ushort2(x);
  y = select(y, (ushort2)0, as_ushort2(convert_short2(x < (float2)0.0f)));
  y = select(y, (ushort2)USHRT_MAX, as_ushort2(convert_short2(x >= (float2)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(float3 x)
{
  ushort3 y = convert_ushort3(x);
  y = select(y, (ushort3)0, as_ushort3(convert_short3(x < (float3)0.0f)));
  y = select(y, (ushort3)USHRT_MAX, as_ushort3(convert_short3(x >= (float3)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(float4 x)
{
  ushort4 y = convert_ushort4(x);
  y = select(y, (ushort4)0, as_ushort4(convert_short4(x < (float4)0.0f)));
  y = select(y, (ushort4)USHRT_MAX, as_ushort4(convert_short4(x >= (float4)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(float8 x)
{
  ushort8 y = convert_ushort8(x);
  y = select(y, (ushort8)0, as_ushort8(convert_short8(x < (float8)0.0f)));
  y = select(y, (ushort8)USHRT_MAX, as_ushort8(convert_short8(x >= (float8)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(float16 x)
{
  ushort16 y = convert_ushort16(x);
  y = select(y, (ushort16)0, as_ushort16(convert_short16(x < (float16)0.0f)));
  y = select(y, (ushort16)USHRT_MAX, as_ushort16(convert_short16(x >= (float16)(0x1p+16f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(float x)
{
  int y = convert_int(x);
  y = select(y, (int)INT_MIN, convert_int(x < (float)(-0x1p+31f)));
  y = select(y, (int)INT_MAX, convert_int(x >= (float)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(float2 x)
{
  int2 y = convert_int2(x);
  y = select(y, (int2)INT_MIN, convert_int2(x < (float2)(-0x1p+31f)));
  y = select(y, (int2)INT_MAX, convert_int2(x >= (float2)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(float3 x)
{
  int3 y = convert_int3(x);
  y = select(y, (int3)INT_MIN, convert_int3(x < (float3)(-0x1p+31f)));
  y = select(y, (int3)INT_MAX, convert_int3(x >= (float3)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(float4 x)
{
  int4 y = convert_int4(x);
  y = select(y, (int4)INT_MIN, convert_int4(x < (float4)(-0x1p+31f)));
  y = select(y, (int4)INT_MAX, convert_int4(x >= (float4)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(float8 x)
{
  int8 y = convert_int8(x);
  y = select(y, (int8)INT_MIN, convert_int8(x < (float8)(-0x1p+31f)));
  y = select(y, (int8)INT_MAX, convert_int8(x >= (float8)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(float16 x)
{
  int16 y = convert_int16(x);
  y = select(y, (int16)INT_MIN, convert_int16(x < (float16)(-0x1p+31f)));
  y = select(y, (int16)INT_MAX, convert_int16(x >= (float16)(0x1p+31f)));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(float x)
{
  uint y = convert_uint(x);
  y = select(y, (uint)0, as_uint(convert_int(x < (float)0.0f)));
  y = select(y, (uint)UINT_MAX, as_uint(convert_int(x >= (float)(0x1p+32f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(float2 x)
{
  uint2 y = convert_uint2(x);
  y = select(y, (uint2)0, as_uint2(convert_int2(x < (float2)0.0f)));
  y = select(y, (uint2)UINT_MAX, as_uint2(convert_int2(x >= (float2)(0x1p+32f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(float3 x)
{
  uint3 y = convert_uint3(x);
  y = select(y, (uint3)0, as_uint3(convert_int3(x < (float3)0.0f)));
  y = select(y, (uint3)UINT_MAX, as_uint3(convert_int3(x >= (float3)(0x1p+32f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(float4 x)
{
  uint4 y = convert_uint4(x);
  y = select(y, (uint4)0, as_uint4(convert_int4(x < (float4)0.0f)));
  y = select(y, (uint4)UINT_MAX, as_uint4(convert_int4(x >= (float4)(0x1p+32f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(float8 x)
{
  uint8 y = convert_uint8(x);
  y = select(y, (uint8)0, as_uint8(convert_int8(x < (float8)0.0f)));
  y = select(y, (uint8)UINT_MAX, as_uint8(convert_int8(x >= (float8)(0x1p+32f))));
  return y;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(float16 x)
{
  uint16 y = convert_uint16(x);
  y = select(y, (uint16)0, as_uint16(convert_int16(x < (float16)0.0f)));
  y = select(y, (uint16)UINT_MAX, as_uint16(convert_int16(x >= (float16)(0x1p+32f))));
  return y;
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(float x)
{
  long y = convert_long(x);
  y = select(y, (long)LONG_MIN, convert_long(x < (float)(-0x1p+63f)));
  y = select(y, (long)LONG_MAX, convert_long(x >= (float)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(float2 x)
{
  long2 y = convert_long2(x);
  y = select(y, (long2)LONG_MIN, convert_long2(x < (float2)(-0x1p+63f)));
  y = select(y, (long2)LONG_MAX, convert_long2(x >= (float2)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(float3 x)
{
  long3 y = convert_long3(x);
  y = select(y, (long3)LONG_MIN, convert_long3(x < (float3)(-0x1p+63f)));
  y = select(y, (long3)LONG_MAX, convert_long3(x >= (float3)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(float4 x)
{
  long4 y = convert_long4(x);
  y = select(y, (long4)LONG_MIN, convert_long4(x < (float4)(-0x1p+63f)));
  y = select(y, (long4)LONG_MAX, convert_long4(x >= (float4)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(float8 x)
{
  long8 y = convert_long8(x);
  y = select(y, (long8)LONG_MIN, convert_long8(x < (float8)(-0x1p+63f)));
  y = select(y, (long8)LONG_MAX, convert_long8(x >= (float8)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(float16 x)
{
  long16 y = convert_long16(x);
  y = select(y, (long16)LONG_MIN, convert_long16(x < (float16)(-0x1p+63f)));
  y = select(y, (long16)LONG_MAX, convert_long16(x >= (float16)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(float x)
{
  ulong y = convert_ulong(x);
  y = select(y, (ulong)0, as_ulong(convert_long(x < (float)0.0f)));
  y = select(y, (ulong)ULONG_MAX, as_ulong(convert_long(x >= (float)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(float2 x)
{
  ulong2 y = convert_ulong2(x);
  y = select(y, (ulong2)0, as_ulong2(convert_long2(x < (float2)0.0f)));
  y = select(y, (ulong2)ULONG_MAX, as_ulong2(convert_long2(x >= (float2)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(float3 x)
{
  ulong3 y = convert_ulong3(x);
  y = select(y, (ulong3)0, as_ulong3(convert_long3(x < (float3)0.0f)));
  y = select(y, (ulong3)ULONG_MAX, as_ulong3(convert_long3(x >= (float3)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(float4 x)
{
  ulong4 y = convert_ulong4(x);
  y = select(y, (ulong4)0, as_ulong4(convert_long4(x < (float4)0.0f)));
  y = select(y, (ulong4)ULONG_MAX, as_ulong4(convert_long4(x >= (float4)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(float8 x)
{
  ulong8 y = convert_ulong8(x);
  y = select(y, (ulong8)0, as_ulong8(convert_long8(x < (float8)0.0f)));
  y = select(y, (ulong8)ULONG_MAX, as_ulong8(convert_long8(x >= (float8)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(float16 x)
{
  ulong16 y = convert_ulong16(x);
  y = select(y, (ulong16)0, as_ulong16(convert_long16(x < (float16)0.0f)));
  y = select(y, (ulong16)ULONG_MAX, as_ulong16(convert_long16(x >= (float16)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat(double x)
{
  char y = convert_char(x);
  y = select(y, (char)CHAR_MIN, convert_char(x < (double)(-0x1p+7f)));
  y = select(y, (char)CHAR_MAX, convert_char(x >= (double)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat(double2 x)
{
  char2 y = convert_char2(x);
  y = select(y, (char2)CHAR_MIN, convert_char2(x < (double2)(-0x1p+7f)));
  y = select(y, (char2)CHAR_MAX, convert_char2(x >= (double2)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat(double3 x)
{
  char3 y = convert_char3(x);
  y = select(y, (char3)CHAR_MIN, convert_char3(x < (double3)(-0x1p+7f)));
  y = select(y, (char3)CHAR_MAX, convert_char3(x >= (double3)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat(double4 x)
{
  char4 y = convert_char4(x);
  y = select(y, (char4)CHAR_MIN, convert_char4(x < (double4)(-0x1p+7f)));
  y = select(y, (char4)CHAR_MAX, convert_char4(x >= (double4)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat(double8 x)
{
  char8 y = convert_char8(x);
  y = select(y, (char8)CHAR_MIN, convert_char8(x < (double8)(-0x1p+7f)));
  y = select(y, (char8)CHAR_MAX, convert_char8(x >= (double8)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat(double16 x)
{
  char16 y = convert_char16(x);
  y = select(y, (char16)CHAR_MIN, convert_char16(x < (double16)(-0x1p+7f)));
  y = select(y, (char16)CHAR_MAX, convert_char16(x >= (double16)(0x1p+7f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat(double x)
{
  uchar y = convert_uchar(x);
  y = select(y, (uchar)0, as_uchar(convert_char(x < (double)0.0f)));
  y = select(y, (uchar)UCHAR_MAX, as_uchar(convert_char(x >= (double)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat(double2 x)
{
  uchar2 y = convert_uchar2(x);
  y = select(y, (uchar2)0, as_uchar2(convert_char2(x < (double2)0.0f)));
  y = select(y, (uchar2)UCHAR_MAX, as_uchar2(convert_char2(x >= (double2)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat(double3 x)
{
  uchar3 y = convert_uchar3(x);
  y = select(y, (uchar3)0, as_uchar3(convert_char3(x < (double3)0.0f)));
  y = select(y, (uchar3)UCHAR_MAX, as_uchar3(convert_char3(x >= (double3)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat(double4 x)
{
  uchar4 y = convert_uchar4(x);
  y = select(y, (uchar4)0, as_uchar4(convert_char4(x < (double4)0.0f)));
  y = select(y, (uchar4)UCHAR_MAX, as_uchar4(convert_char4(x >= (double4)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat(double8 x)
{
  uchar8 y = convert_uchar8(x);
  y = select(y, (uchar8)0, as_uchar8(convert_char8(x < (double8)0.0f)));
  y = select(y, (uchar8)UCHAR_MAX, as_uchar8(convert_char8(x >= (double8)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat(double16 x)
{
  uchar16 y = convert_uchar16(x);
  y = select(y, (uchar16)0, as_uchar16(convert_char16(x < (double16)0.0f)));
  y = select(y, (uchar16)UCHAR_MAX, as_uchar16(convert_char16(x >= (double16)(0x1p+8f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat(double x)
{
  short y = convert_short(x);
  y = select(y, (short)SHRT_MIN, convert_short(x < (double)(-0x1p+15f)));
  y = select(y, (short)SHRT_MAX, convert_short(x >= (double)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat(double2 x)
{
  short2 y = convert_short2(x);
  y = select(y, (short2)SHRT_MIN, convert_short2(x < (double2)(-0x1p+15f)));
  y = select(y, (short2)SHRT_MAX, convert_short2(x >= (double2)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat(double3 x)
{
  short3 y = convert_short3(x);
  y = select(y, (short3)SHRT_MIN, convert_short3(x < (double3)(-0x1p+15f)));
  y = select(y, (short3)SHRT_MAX, convert_short3(x >= (double3)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat(double4 x)
{
  short4 y = convert_short4(x);
  y = select(y, (short4)SHRT_MIN, convert_short4(x < (double4)(-0x1p+15f)));
  y = select(y, (short4)SHRT_MAX, convert_short4(x >= (double4)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat(double8 x)
{
  short8 y = convert_short8(x);
  y = select(y, (short8)SHRT_MIN, convert_short8(x < (double8)(-0x1p+15f)));
  y = select(y, (short8)SHRT_MAX, convert_short8(x >= (double8)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat(double16 x)
{
  short16 y = convert_short16(x);
  y = select(y, (short16)SHRT_MIN, convert_short16(x < (double16)(-0x1p+15f)));
  y = select(y, (short16)SHRT_MAX, convert_short16(x >= (double16)(0x1p+15f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat(double x)
{
  ushort y = convert_ushort(x);
  y = select(y, (ushort)0, as_ushort(convert_short(x < (double)0.0f)));
  y = select(y, (ushort)USHRT_MAX, as_ushort(convert_short(x >= (double)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat(double2 x)
{
  ushort2 y = convert_ushort2(x);
  y = select(y, (ushort2)0, as_ushort2(convert_short2(x < (double2)0.0f)));
  y = select(y, (ushort2)USHRT_MAX, as_ushort2(convert_short2(x >= (double2)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat(double3 x)
{
  ushort3 y = convert_ushort3(x);
  y = select(y, (ushort3)0, as_ushort3(convert_short3(x < (double3)0.0f)));
  y = select(y, (ushort3)USHRT_MAX, as_ushort3(convert_short3(x >= (double3)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat(double4 x)
{
  ushort4 y = convert_ushort4(x);
  y = select(y, (ushort4)0, as_ushort4(convert_short4(x < (double4)0.0f)));
  y = select(y, (ushort4)USHRT_MAX, as_ushort4(convert_short4(x >= (double4)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat(double8 x)
{
  ushort8 y = convert_ushort8(x);
  y = select(y, (ushort8)0, as_ushort8(convert_short8(x < (double8)0.0f)));
  y = select(y, (ushort8)USHRT_MAX, as_ushort8(convert_short8(x >= (double8)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat(double16 x)
{
  ushort16 y = convert_ushort16(x);
  y = select(y, (ushort16)0, as_ushort16(convert_short16(x < (double16)0.0f)));
  y = select(y, (ushort16)USHRT_MAX, as_ushort16(convert_short16(x >= (double16)(0x1p+16f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat(double x)
{
  int y = convert_int(x);
  y = select(y, (int)INT_MIN, convert_int(x < (double)(-0x1p+31f)));
  y = select(y, (int)INT_MAX, convert_int(x >= (double)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat(double2 x)
{
  int2 y = convert_int2(x);
  y = select(y, (int2)INT_MIN, convert_int2(x < (double2)(-0x1p+31f)));
  y = select(y, (int2)INT_MAX, convert_int2(x >= (double2)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat(double3 x)
{
  int3 y = convert_int3(x);
  y = select(y, (int3)INT_MIN, convert_int3(x < (double3)(-0x1p+31f)));
  y = select(y, (int3)INT_MAX, convert_int3(x >= (double3)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat(double4 x)
{
  int4 y = convert_int4(x);
  y = select(y, (int4)INT_MIN, convert_int4(x < (double4)(-0x1p+31f)));
  y = select(y, (int4)INT_MAX, convert_int4(x >= (double4)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat(double8 x)
{
  int8 y = convert_int8(x);
  y = select(y, (int8)INT_MIN, convert_int8(x < (double8)(-0x1p+31f)));
  y = select(y, (int8)INT_MAX, convert_int8(x >= (double8)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat(double16 x)
{
  int16 y = convert_int16(x);
  y = select(y, (int16)INT_MIN, convert_int16(x < (double16)(-0x1p+31f)));
  y = select(y, (int16)INT_MAX, convert_int16(x >= (double16)(0x1p+31f)));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat(double x)
{
  uint y = convert_uint(x);
  y = select(y, (uint)0, as_uint(convert_int(x < (double)0.0f)));
  y = select(y, (uint)UINT_MAX, as_uint(convert_int(x >= (double)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat(double2 x)
{
  uint2 y = convert_uint2(x);
  y = select(y, (uint2)0, as_uint2(convert_int2(x < (double2)0.0f)));
  y = select(y, (uint2)UINT_MAX, as_uint2(convert_int2(x >= (double2)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat(double3 x)
{
  uint3 y = convert_uint3(x);
  y = select(y, (uint3)0, as_uint3(convert_int3(x < (double3)0.0f)));
  y = select(y, (uint3)UINT_MAX, as_uint3(convert_int3(x >= (double3)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat(double4 x)
{
  uint4 y = convert_uint4(x);
  y = select(y, (uint4)0, as_uint4(convert_int4(x < (double4)0.0f)));
  y = select(y, (uint4)UINT_MAX, as_uint4(convert_int4(x >= (double4)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat(double8 x)
{
  uint8 y = convert_uint8(x);
  y = select(y, (uint8)0, as_uint8(convert_int8(x < (double8)0.0f)));
  y = select(y, (uint8)UINT_MAX, as_uint8(convert_int8(x >= (double8)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat(double16 x)
{
  uint16 y = convert_uint16(x);
  y = select(y, (uint16)0, as_uint16(convert_int16(x < (double16)0.0f)));
  y = select(y, (uint16)UINT_MAX, as_uint16(convert_int16(x >= (double16)(0x1p+32f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat(double x)
{
  long y = convert_long(x);
  y = select(y, (long)LONG_MIN, convert_long(x < (double)(-0x1p+63f)));
  y = select(y, (long)LONG_MAX, convert_long(x >= (double)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat(double2 x)
{
  long2 y = convert_long2(x);
  y = select(y, (long2)LONG_MIN, convert_long2(x < (double2)(-0x1p+63f)));
  y = select(y, (long2)LONG_MAX, convert_long2(x >= (double2)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat(double3 x)
{
  long3 y = convert_long3(x);
  y = select(y, (long3)LONG_MIN, convert_long3(x < (double3)(-0x1p+63f)));
  y = select(y, (long3)LONG_MAX, convert_long3(x >= (double3)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat(double4 x)
{
  long4 y = convert_long4(x);
  y = select(y, (long4)LONG_MIN, convert_long4(x < (double4)(-0x1p+63f)));
  y = select(y, (long4)LONG_MAX, convert_long4(x >= (double4)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat(double8 x)
{
  long8 y = convert_long8(x);
  y = select(y, (long8)LONG_MIN, convert_long8(x < (double8)(-0x1p+63f)));
  y = select(y, (long8)LONG_MAX, convert_long8(x >= (double8)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat(double16 x)
{
  long16 y = convert_long16(x);
  y = select(y, (long16)LONG_MIN, convert_long16(x < (double16)(-0x1p+63f)));
  y = select(y, (long16)LONG_MAX, convert_long16(x >= (double16)(0x1p+63f)));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat(double x)
{
  ulong y = convert_ulong(x);
  y = select(y, (ulong)0, as_ulong(convert_long(x < (double)0.0f)));
  y = select(y, (ulong)ULONG_MAX, as_ulong(convert_long(x >= (double)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat(double2 x)
{
  ulong2 y = convert_ulong2(x);
  y = select(y, (ulong2)0, as_ulong2(convert_long2(x < (double2)0.0f)));
  y = select(y, (ulong2)ULONG_MAX, as_ulong2(convert_long2(x >= (double2)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat(double3 x)
{
  ulong3 y = convert_ulong3(x);
  y = select(y, (ulong3)0, as_ulong3(convert_long3(x < (double3)0.0f)));
  y = select(y, (ulong3)ULONG_MAX, as_ulong3(convert_long3(x >= (double3)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat(double4 x)
{
  ulong4 y = convert_ulong4(x);
  y = select(y, (ulong4)0, as_ulong4(convert_long4(x < (double4)0.0f)));
  y = select(y, (ulong4)ULONG_MAX, as_ulong4(convert_long4(x >= (double4)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat(double8 x)
{
  ulong8 y = convert_ulong8(x);
  y = select(y, (ulong8)0, as_ulong8(convert_long8(x < (double8)0.0f)));
  y = select(y, (ulong8)ULONG_MAX, as_ulong8(convert_long8(x >= (double8)(0x1p+64f))));
  return y;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat(double16 x)
{
  ulong16 y = convert_ulong16(x);
  y = select(y, (ulong16)0, as_ulong16(convert_long16(x < (double16)0.0f)));
  y = select(y, (ulong16)ULONG_MAX, as_ulong16(convert_long16(x >= (double16)(0x1p+64f))));
  return y;
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(char x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(char x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(char x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(char x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(char2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(char2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(char2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(char2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(char3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(char3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(char3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(char3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(char4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(char4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(char4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(char4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(char8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(char8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(char8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(char8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(char16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(char16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(char16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(char16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(char x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(char x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(char x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(char x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(char2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(char2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(char2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(char2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(char3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(char3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(char3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(char3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(char4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(char4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(char4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(char4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(char8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(char8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(char8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(char8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(char16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(char16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(char16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(char16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(char x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(char x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(char x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(char x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(char2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(char2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(char2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(char2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(char3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(char3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(char3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(char3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(char4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(char4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(char4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(char4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(char8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(char8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(char8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(char8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(char16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(char16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(char16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(char16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(char x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(char x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(char x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(char x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(char2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(char2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(char2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(char2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(char3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(char3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(char3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(char3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(char4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(char4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(char4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(char4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(char8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(char8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(char8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(char8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(char16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(char16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(char16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(char16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(char x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(char x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(char x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(char x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(char2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(char2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(char2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(char2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(char3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(char3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(char3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(char3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(char4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(char4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(char4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(char4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(char8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(char8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(char8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(char8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(char16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(char16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(char16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(char16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(char x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(char x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(char x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(char x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(char2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(char2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(char2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(char2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(char3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(char3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(char3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(char3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(char4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(char4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(char4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(char4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(char8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(char8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(char8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(char8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(char16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(char16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(char16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(char16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(char x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(char x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(char x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(char x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(char2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(char2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(char2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(char2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(char3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(char3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(char3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(char3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(char4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(char4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(char4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(char4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(char8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(char8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(char8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(char8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(char16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(char16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(char16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(char16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(char x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(char x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(char x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(char x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(char2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(char2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(char2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(char2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(char3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(char3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(char3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(char3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(char4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(char4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(char4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(char4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(char8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(char8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(char8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(char8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(char16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(char16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(char16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(char16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(uchar x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(uchar x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(uchar x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(uchar x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(uchar2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(uchar2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(uchar2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(uchar2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(uchar3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(uchar3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(uchar3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(uchar3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(uchar4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(uchar4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(uchar4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(uchar4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(uchar8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(uchar8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(uchar8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(uchar8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(uchar16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(uchar16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(uchar16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(uchar16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(uchar x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(uchar x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(uchar x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(uchar x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(uchar2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(uchar2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(uchar2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(uchar2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(uchar3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(uchar3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(uchar3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(uchar3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(uchar4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(uchar4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(uchar4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(uchar4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(uchar8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(uchar8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(uchar8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(uchar8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(uchar16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(uchar16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(uchar16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(uchar16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(uchar x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(uchar x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(uchar x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(uchar x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(uchar2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(uchar2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(uchar2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(uchar2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(uchar3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(uchar3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(uchar3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(uchar3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(uchar4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(uchar4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(uchar4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(uchar4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(uchar8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(uchar8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(uchar8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(uchar8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(uchar16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(uchar16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(uchar16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(uchar16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(uchar x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(uchar x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(uchar x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(uchar x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(uchar2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(uchar2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(uchar2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(uchar2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(uchar3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(uchar3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(uchar3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(uchar3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(uchar4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(uchar4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(uchar4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(uchar4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(uchar8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(uchar8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(uchar8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(uchar8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(uchar16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(uchar16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(uchar16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(uchar16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(uchar x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(uchar x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(uchar x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(uchar x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(uchar2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(uchar2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(uchar2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(uchar2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(uchar3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(uchar3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(uchar3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(uchar3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(uchar4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(uchar4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(uchar4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(uchar4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(uchar8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(uchar8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(uchar8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(uchar8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(uchar16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(uchar16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(uchar16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(uchar16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(uchar x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(uchar x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(uchar x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(uchar x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(uchar2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(uchar2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(uchar2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(uchar2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(uchar3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(uchar3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(uchar3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(uchar3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(uchar4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(uchar4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(uchar4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(uchar4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(uchar8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(uchar8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(uchar8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(uchar8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(uchar16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(uchar16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(uchar16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(uchar16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(uchar x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(uchar x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(uchar x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(uchar x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(uchar2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(uchar2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(uchar2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(uchar2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(uchar3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(uchar3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(uchar3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(uchar3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(uchar4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(uchar4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(uchar4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(uchar4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(uchar8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(uchar8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(uchar8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(uchar8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(uchar16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(uchar16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(uchar16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(uchar16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(uchar x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(uchar x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(uchar x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(uchar x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(uchar2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(uchar2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(uchar2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(uchar2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(uchar3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(uchar3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(uchar3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(uchar3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(uchar4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(uchar4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(uchar4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(uchar4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(uchar8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(uchar8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(uchar8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(uchar8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(uchar16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(uchar16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(uchar16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(uchar16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(short x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(short x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(short x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(short x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(short2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(short2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(short2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(short2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(short3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(short3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(short3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(short3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(short4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(short4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(short4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(short4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(short8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(short8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(short8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(short8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(short16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(short16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(short16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(short16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(short x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(short x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(short x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(short x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(short2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(short2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(short2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(short2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(short3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(short3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(short3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(short3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(short4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(short4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(short4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(short4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(short8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(short8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(short8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(short8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(short16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(short16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(short16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(short16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(short x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(short x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(short x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(short x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(short2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(short2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(short2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(short2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(short3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(short3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(short3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(short3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(short4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(short4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(short4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(short4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(short8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(short8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(short8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(short8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(short16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(short16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(short16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(short16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(short x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(short x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(short x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(short x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(short2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(short2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(short2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(short2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(short3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(short3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(short3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(short3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(short4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(short4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(short4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(short4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(short8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(short8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(short8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(short8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(short16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(short16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(short16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(short16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(short x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(short x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(short x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(short x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(short2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(short2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(short2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(short2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(short3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(short3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(short3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(short3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(short4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(short4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(short4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(short4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(short8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(short8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(short8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(short8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(short16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(short16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(short16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(short16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(short x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(short x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(short x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(short x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(short2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(short2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(short2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(short2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(short3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(short3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(short3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(short3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(short4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(short4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(short4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(short4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(short8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(short8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(short8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(short8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(short16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(short16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(short16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(short16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(short x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(short x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(short x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(short x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(short2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(short2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(short2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(short2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(short3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(short3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(short3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(short3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(short4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(short4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(short4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(short4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(short8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(short8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(short8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(short8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(short16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(short16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(short16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(short16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(short x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(short x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(short x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(short x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(short2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(short2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(short2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(short2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(short3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(short3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(short3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(short3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(short4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(short4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(short4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(short4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(short8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(short8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(short8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(short8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(short16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(short16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(short16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(short16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(ushort x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(ushort x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(ushort x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(ushort x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(ushort2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(ushort2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(ushort2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(ushort2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(ushort3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(ushort3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(ushort3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(ushort3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(ushort4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(ushort4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(ushort4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(ushort4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(ushort8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(ushort8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(ushort8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(ushort8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(ushort16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(ushort16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(ushort16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(ushort16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(ushort x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(ushort x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(ushort x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(ushort x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(ushort2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(ushort2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(ushort2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(ushort2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(ushort3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(ushort3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(ushort3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(ushort3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(ushort4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(ushort4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(ushort4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(ushort4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(ushort8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(ushort8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(ushort8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(ushort8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(ushort16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(ushort16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(ushort16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(ushort16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(ushort x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(ushort x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(ushort x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(ushort x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(ushort2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(ushort2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(ushort2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(ushort2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(ushort3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(ushort3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(ushort3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(ushort3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(ushort4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(ushort4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(ushort4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(ushort4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(ushort8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(ushort8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(ushort8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(ushort8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(ushort16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(ushort16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(ushort16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(ushort16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(ushort x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(ushort x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(ushort x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(ushort x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(ushort2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(ushort2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(ushort2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(ushort2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(ushort3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(ushort3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(ushort3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(ushort3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(ushort4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(ushort4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(ushort4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(ushort4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(ushort8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(ushort8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(ushort8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(ushort8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(ushort16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(ushort16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(ushort16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(ushort16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(ushort x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(ushort x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(ushort x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(ushort x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(ushort2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(ushort2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(ushort2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(ushort2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(ushort3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(ushort3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(ushort3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(ushort3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(ushort4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(ushort4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(ushort4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(ushort4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(ushort8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(ushort8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(ushort8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(ushort8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(ushort16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(ushort16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(ushort16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(ushort16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(ushort x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(ushort x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(ushort x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(ushort x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(ushort2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(ushort2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(ushort2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(ushort2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(ushort3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(ushort3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(ushort3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(ushort3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(ushort4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(ushort4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(ushort4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(ushort4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(ushort8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(ushort8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(ushort8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(ushort8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(ushort16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(ushort16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(ushort16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(ushort16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(ushort x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(ushort x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(ushort x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(ushort x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(ushort2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(ushort2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(ushort2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(ushort2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(ushort3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(ushort3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(ushort3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(ushort3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(ushort4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(ushort4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(ushort4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(ushort4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(ushort8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(ushort8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(ushort8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(ushort8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(ushort16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(ushort16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(ushort16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(ushort16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(ushort x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(ushort x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(ushort x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(ushort x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(ushort2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(ushort2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(ushort2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(ushort2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(ushort3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(ushort3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(ushort3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(ushort3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(ushort4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(ushort4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(ushort4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(ushort4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(ushort8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(ushort8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(ushort8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(ushort8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(ushort16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(ushort16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(ushort16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(ushort16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(int x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(int x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(int x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(int x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(int2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(int2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(int2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(int2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(int3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(int3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(int3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(int3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(int4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(int4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(int4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(int4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(int8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(int8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(int8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(int8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(int16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(int16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(int16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(int16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(int x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(int x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(int x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(int x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(int2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(int2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(int2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(int2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(int3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(int3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(int3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(int3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(int4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(int4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(int4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(int4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(int8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(int8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(int8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(int8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(int16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(int16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(int16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(int16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(int x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(int x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(int x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(int x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(int2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(int2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(int2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(int2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(int3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(int3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(int3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(int3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(int4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(int4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(int4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(int4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(int8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(int8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(int8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(int8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(int16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(int16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(int16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(int16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(int x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(int x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(int x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(int x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(int2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(int2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(int2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(int2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(int3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(int3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(int3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(int3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(int4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(int4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(int4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(int4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(int8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(int8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(int8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(int8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(int16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(int16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(int16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(int16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(int x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(int x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(int x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(int x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(int2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(int2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(int2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(int2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(int3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(int3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(int3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(int3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(int4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(int4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(int4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(int4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(int8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(int8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(int8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(int8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(int16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(int16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(int16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(int16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(int x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(int x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(int x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(int x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(int2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(int2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(int2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(int2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(int3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(int3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(int3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(int3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(int4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(int4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(int4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(int4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(int8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(int8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(int8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(int8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(int16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(int16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(int16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(int16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(int x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(int x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(int x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(int x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(int2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(int2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(int2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(int2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(int3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(int3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(int3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(int3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(int4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(int4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(int4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(int4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(int8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(int8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(int8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(int8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(int16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(int16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(int16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(int16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(int x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(int x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(int x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(int x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(int2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(int2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(int2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(int2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(int3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(int3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(int3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(int3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(int4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(int4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(int4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(int4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(int8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(int8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(int8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(int8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(int16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(int16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(int16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(int16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(uint x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(uint x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(uint x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(uint x)
{
  return convert_char_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(uint2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(uint2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(uint2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(uint2 x)
{
  return convert_char2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(uint3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(uint3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(uint3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(uint3 x)
{
  return convert_char3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(uint4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(uint4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(uint4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(uint4 x)
{
  return convert_char4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(uint8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(uint8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(uint8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(uint8 x)
{
  return convert_char8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(uint16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(uint16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(uint16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(uint16 x)
{
  return convert_char16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(uint x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(uint x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(uint x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(uint x)
{
  return convert_uchar_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(uint2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(uint2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(uint2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(uint2 x)
{
  return convert_uchar2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(uint3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(uint3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(uint3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(uint3 x)
{
  return convert_uchar3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(uint4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(uint4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(uint4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(uint4 x)
{
  return convert_uchar4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(uint8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(uint8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(uint8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(uint8 x)
{
  return convert_uchar8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(uint16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(uint16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(uint16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(uint16 x)
{
  return convert_uchar16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(uint x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(uint x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(uint x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(uint x)
{
  return convert_short_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(uint2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(uint2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(uint2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(uint2 x)
{
  return convert_short2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(uint3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(uint3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(uint3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(uint3 x)
{
  return convert_short3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(uint4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(uint4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(uint4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(uint4 x)
{
  return convert_short4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(uint8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(uint8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(uint8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(uint8 x)
{
  return convert_short8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(uint16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(uint16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(uint16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(uint16 x)
{
  return convert_short16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(uint x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(uint x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(uint x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(uint x)
{
  return convert_ushort_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(uint2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(uint2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(uint2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(uint2 x)
{
  return convert_ushort2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(uint3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(uint3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(uint3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(uint3 x)
{
  return convert_ushort3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(uint4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(uint4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(uint4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(uint4 x)
{
  return convert_ushort4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(uint8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(uint8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(uint8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(uint8 x)
{
  return convert_ushort8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(uint16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(uint16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(uint16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(uint16 x)
{
  return convert_ushort16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(uint x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(uint x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(uint x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(uint x)
{
  return convert_int_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(uint2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(uint2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(uint2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(uint2 x)
{
  return convert_int2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(uint3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(uint3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(uint3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(uint3 x)
{
  return convert_int3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(uint4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(uint4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(uint4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(uint4 x)
{
  return convert_int4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(uint8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(uint8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(uint8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(uint8 x)
{
  return convert_int8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(uint16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(uint16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(uint16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(uint16 x)
{
  return convert_int16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(uint x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(uint x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(uint x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(uint x)
{
  return convert_uint_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(uint2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(uint2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(uint2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(uint2 x)
{
  return convert_uint2_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(uint3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(uint3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(uint3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(uint3 x)
{
  return convert_uint3_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(uint4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(uint4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(uint4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(uint4 x)
{
  return convert_uint4_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(uint8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(uint8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(uint8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(uint8 x)
{
  return convert_uint8_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(uint16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(uint16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(uint16 x)
{
  return convert_uint16_sat(x);
}


_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(uint16 x)
{
  return convert_uint16_sat(x);
}


#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(uint x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(uint x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(uint x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(uint x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(uint2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(uint2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(uint2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(uint2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(uint3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(uint3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(uint3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(uint3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(uint4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(uint4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(uint4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(uint4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(uint8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(uint8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(uint8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(uint8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(uint16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(uint16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(uint16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(uint16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(uint x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(uint x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(uint x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(uint x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(uint2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(uint2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(uint2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(uint2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(uint3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(uint3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(uint3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(uint3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(uint4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(uint4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(uint4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(uint4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(uint8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(uint8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(uint8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(uint8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(uint16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(uint16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(uint16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(uint16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(long x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(long x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(long x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(long x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(long2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(long2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(long2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(long2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(long3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(long3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(long3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(long3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(long4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(long4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(long4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(long4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(long8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(long8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(long8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(long8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(long16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(long16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(long16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(long16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(long x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(long x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(long x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(long x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(long2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(long2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(long2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(long2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(long3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(long3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(long3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(long3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(long4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(long4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(long4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(long4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(long8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(long8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(long8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(long8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(long16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(long16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(long16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(long16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(long x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(long x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(long x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(long x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(long2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(long2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(long2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(long2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(long3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(long3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(long3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(long3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(long4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(long4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(long4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(long4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(long8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(long8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(long8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(long8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(long16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(long16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(long16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(long16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(long x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(long x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(long x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(long x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(long2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(long2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(long2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(long2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(long3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(long3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(long3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(long3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(long4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(long4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(long4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(long4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(long8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(long8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(long8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(long8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(long16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(long16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(long16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(long16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(long x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(long x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(long x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(long x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(long2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(long2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(long2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(long2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(long3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(long3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(long3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(long3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(long4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(long4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(long4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(long4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(long8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(long8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(long8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(long8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(long16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(long16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(long16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(long16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(long x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(long x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(long x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(long x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(long2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(long2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(long2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(long2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(long3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(long3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(long3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(long3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(long4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(long4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(long4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(long4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(long8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(long8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(long8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(long8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(long16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(long16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(long16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(long16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(long x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(long x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(long x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(long x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(long2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(long2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(long2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(long2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(long3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(long3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(long3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(long3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(long4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(long4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(long4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(long4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(long8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(long8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(long8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(long8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(long16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(long16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(long16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(long16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(long x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(long x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(long x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(long x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(long2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(long2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(long2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(long2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(long3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(long3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(long3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(long3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(long4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(long4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(long4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(long4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(long8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(long8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(long8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(long8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(long16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(long16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(long16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(long16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(ulong x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(ulong x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(ulong x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(ulong x)
{
  return convert_char_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(ulong2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(ulong2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(ulong2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(ulong2 x)
{
  return convert_char2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(ulong3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(ulong3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(ulong3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(ulong3 x)
{
  return convert_char3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(ulong4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(ulong4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(ulong4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(ulong4 x)
{
  return convert_char4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(ulong8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(ulong8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(ulong8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(ulong8 x)
{
  return convert_char8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(ulong16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(ulong16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(ulong16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(ulong16 x)
{
  return convert_char16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(ulong x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(ulong x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(ulong x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(ulong x)
{
  return convert_uchar_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(ulong2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(ulong2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(ulong2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(ulong2 x)
{
  return convert_uchar2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(ulong3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(ulong3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(ulong3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(ulong3 x)
{
  return convert_uchar3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(ulong4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(ulong4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(ulong4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(ulong4 x)
{
  return convert_uchar4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(ulong8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(ulong8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(ulong8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(ulong8 x)
{
  return convert_uchar8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(ulong16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(ulong16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(ulong16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(ulong16 x)
{
  return convert_uchar16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(ulong x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(ulong x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(ulong x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(ulong x)
{
  return convert_short_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(ulong2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(ulong2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(ulong2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(ulong2 x)
{
  return convert_short2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(ulong3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(ulong3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(ulong3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(ulong3 x)
{
  return convert_short3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(ulong4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(ulong4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(ulong4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(ulong4 x)
{
  return convert_short4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(ulong8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(ulong8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(ulong8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(ulong8 x)
{
  return convert_short8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(ulong16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(ulong16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(ulong16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(ulong16 x)
{
  return convert_short16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(ulong x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(ulong x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(ulong x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(ulong x)
{
  return convert_ushort_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(ulong2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(ulong2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(ulong2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(ulong2 x)
{
  return convert_ushort2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(ulong3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(ulong3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(ulong3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(ulong3 x)
{
  return convert_ushort3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(ulong4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(ulong4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(ulong4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(ulong4 x)
{
  return convert_ushort4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(ulong8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(ulong8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(ulong8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(ulong8 x)
{
  return convert_ushort8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(ulong16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(ulong16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(ulong16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(ulong16 x)
{
  return convert_ushort16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(ulong x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(ulong x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(ulong x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(ulong x)
{
  return convert_int_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(ulong2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(ulong2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(ulong2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(ulong2 x)
{
  return convert_int2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(ulong3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(ulong3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(ulong3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(ulong3 x)
{
  return convert_int3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(ulong4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(ulong4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(ulong4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(ulong4 x)
{
  return convert_int4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(ulong8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(ulong8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(ulong8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(ulong8 x)
{
  return convert_int8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(ulong16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(ulong16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(ulong16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(ulong16 x)
{
  return convert_int16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(ulong x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(ulong x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(ulong x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(ulong x)
{
  return convert_uint_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(ulong2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(ulong2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(ulong2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(ulong2 x)
{
  return convert_uint2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(ulong3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(ulong3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(ulong3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(ulong3 x)
{
  return convert_uint3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(ulong4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(ulong4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(ulong4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(ulong4 x)
{
  return convert_uint4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(ulong8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(ulong8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(ulong8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(ulong8 x)
{
  return convert_uint8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(ulong16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(ulong16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(ulong16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(ulong16 x)
{
  return convert_uint16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(ulong x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(ulong x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(ulong x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(ulong x)
{
  return convert_long_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(ulong2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(ulong2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(ulong2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(ulong2 x)
{
  return convert_long2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(ulong3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(ulong3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(ulong3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(ulong3 x)
{
  return convert_long3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(ulong4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(ulong4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(ulong4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(ulong4 x)
{
  return convert_long4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(ulong8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(ulong8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(ulong8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(ulong8 x)
{
  return convert_long8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(ulong16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(ulong16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(ulong16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(ulong16 x)
{
  return convert_long16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(ulong x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(ulong x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(ulong x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(ulong x)
{
  return convert_ulong_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(ulong2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(ulong2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(ulong2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(ulong2 x)
{
  return convert_ulong2_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(ulong3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(ulong3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(ulong3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(ulong3 x)
{
  return convert_ulong3_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(ulong4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(ulong4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(ulong4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(ulong4 x)
{
  return convert_ulong4_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(ulong8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(ulong8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(ulong8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(ulong8 x)
{
  return convert_ulong8_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(ulong16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(ulong16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(ulong16 x)
{
  return convert_ulong16_sat(x);
}

#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(ulong16 x)
{
  return convert_ulong16_sat(x);
}

#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(float x)
{
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(float x)
{
  return convert_char_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(float x)
{
  x = rint(x);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(float x)
{
  x = rint(x);
  return convert_char_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(float x)
{
  x = ceil(x);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(float x)
{
  x = ceil(x);
  return convert_char_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(float x)
{
  x = floor(x);
  return convert_char(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(float x)
{
  x = floor(x);
  return convert_char_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(float2 x)
{
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(float2 x)
{
  return convert_char2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(float2 x)
{
  x = rint(x);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_char2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(float2 x)
{
  x = ceil(x);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_char2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(float2 x)
{
  x = floor(x);
  return convert_char2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_char2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(float3 x)
{
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(float3 x)
{
  return convert_char3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(float3 x)
{
  x = rint(x);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_char3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(float3 x)
{
  x = ceil(x);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_char3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(float3 x)
{
  x = floor(x);
  return convert_char3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_char3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(float4 x)
{
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(float4 x)
{
  return convert_char4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(float4 x)
{
  x = rint(x);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_char4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(float4 x)
{
  x = ceil(x);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_char4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(float4 x)
{
  x = floor(x);
  return convert_char4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_char4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(float8 x)
{
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(float8 x)
{
  return convert_char8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(float8 x)
{
  x = rint(x);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_char8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(float8 x)
{
  x = ceil(x);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_char8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(float8 x)
{
  x = floor(x);
  return convert_char8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_char8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(float16 x)
{
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(float16 x)
{
  return convert_char16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(float16 x)
{
  x = rint(x);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_char16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(float16 x)
{
  x = ceil(x);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_char16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(float16 x)
{
  x = floor(x);
  return convert_char16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_char16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(float x)
{
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(float x)
{
  return convert_uchar_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(float x)
{
  x = rint(x);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(float x)
{
  x = rint(x);
  return convert_uchar_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(float x)
{
  x = ceil(x);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(float x)
{
  x = ceil(x);
  return convert_uchar_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(float x)
{
  x = floor(x);
  return convert_uchar(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(float x)
{
  x = floor(x);
  return convert_uchar_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(float2 x)
{
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(float2 x)
{
  return convert_uchar2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(float2 x)
{
  x = rint(x);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_uchar2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(float2 x)
{
  x = ceil(x);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_uchar2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(float2 x)
{
  x = floor(x);
  return convert_uchar2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_uchar2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(float3 x)
{
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(float3 x)
{
  return convert_uchar3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(float3 x)
{
  x = rint(x);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_uchar3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(float3 x)
{
  x = ceil(x);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_uchar3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(float3 x)
{
  x = floor(x);
  return convert_uchar3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_uchar3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(float4 x)
{
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(float4 x)
{
  return convert_uchar4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(float4 x)
{
  x = rint(x);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_uchar4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(float4 x)
{
  x = ceil(x);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_uchar4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(float4 x)
{
  x = floor(x);
  return convert_uchar4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_uchar4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(float8 x)
{
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(float8 x)
{
  return convert_uchar8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(float8 x)
{
  x = rint(x);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_uchar8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(float8 x)
{
  x = ceil(x);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_uchar8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(float8 x)
{
  x = floor(x);
  return convert_uchar8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_uchar8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(float16 x)
{
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(float16 x)
{
  return convert_uchar16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(float16 x)
{
  x = rint(x);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_uchar16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(float16 x)
{
  x = ceil(x);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_uchar16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(float16 x)
{
  x = floor(x);
  return convert_uchar16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_uchar16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(float x)
{
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(float x)
{
  return convert_short_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(float x)
{
  x = rint(x);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(float x)
{
  x = rint(x);
  return convert_short_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(float x)
{
  x = ceil(x);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(float x)
{
  x = ceil(x);
  return convert_short_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(float x)
{
  x = floor(x);
  return convert_short(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(float x)
{
  x = floor(x);
  return convert_short_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(float2 x)
{
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(float2 x)
{
  return convert_short2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(float2 x)
{
  x = rint(x);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_short2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(float2 x)
{
  x = ceil(x);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_short2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(float2 x)
{
  x = floor(x);
  return convert_short2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_short2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(float3 x)
{
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(float3 x)
{
  return convert_short3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(float3 x)
{
  x = rint(x);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_short3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(float3 x)
{
  x = ceil(x);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_short3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(float3 x)
{
  x = floor(x);
  return convert_short3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_short3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(float4 x)
{
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(float4 x)
{
  return convert_short4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(float4 x)
{
  x = rint(x);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_short4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(float4 x)
{
  x = ceil(x);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_short4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(float4 x)
{
  x = floor(x);
  return convert_short4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_short4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(float8 x)
{
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(float8 x)
{
  return convert_short8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(float8 x)
{
  x = rint(x);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_short8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(float8 x)
{
  x = ceil(x);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_short8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(float8 x)
{
  x = floor(x);
  return convert_short8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_short8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(float16 x)
{
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(float16 x)
{
  return convert_short16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(float16 x)
{
  x = rint(x);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_short16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(float16 x)
{
  x = ceil(x);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_short16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(float16 x)
{
  x = floor(x);
  return convert_short16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_short16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(float x)
{
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(float x)
{
  return convert_ushort_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(float x)
{
  x = rint(x);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(float x)
{
  x = rint(x);
  return convert_ushort_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(float x)
{
  x = ceil(x);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(float x)
{
  x = ceil(x);
  return convert_ushort_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(float x)
{
  x = floor(x);
  return convert_ushort(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(float x)
{
  x = floor(x);
  return convert_ushort_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(float2 x)
{
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(float2 x)
{
  return convert_ushort2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(float2 x)
{
  x = rint(x);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_ushort2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(float2 x)
{
  x = ceil(x);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_ushort2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(float2 x)
{
  x = floor(x);
  return convert_ushort2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_ushort2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(float3 x)
{
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(float3 x)
{
  return convert_ushort3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(float3 x)
{
  x = rint(x);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_ushort3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(float3 x)
{
  x = ceil(x);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_ushort3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(float3 x)
{
  x = floor(x);
  return convert_ushort3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_ushort3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(float4 x)
{
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(float4 x)
{
  return convert_ushort4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(float4 x)
{
  x = rint(x);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_ushort4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(float4 x)
{
  x = ceil(x);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_ushort4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(float4 x)
{
  x = floor(x);
  return convert_ushort4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_ushort4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(float8 x)
{
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(float8 x)
{
  return convert_ushort8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(float8 x)
{
  x = rint(x);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_ushort8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(float8 x)
{
  x = ceil(x);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_ushort8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(float8 x)
{
  x = floor(x);
  return convert_ushort8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_ushort8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(float16 x)
{
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(float16 x)
{
  return convert_ushort16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(float16 x)
{
  x = rint(x);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_ushort16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(float16 x)
{
  x = ceil(x);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_ushort16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(float16 x)
{
  x = floor(x);
  return convert_ushort16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_ushort16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(float x)
{
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(float x)
{
  return convert_int_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(float x)
{
  x = rint(x);
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(float x)
{
  x = rint(x);
  return convert_int_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(float x)
{
  x = ceil(x);
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(float x)
{
  x = ceil(x);
  return convert_int_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(float x)
{
  x = floor(x);
  return convert_int(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(float x)
{
  x = floor(x);
  return convert_int_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(float2 x)
{
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(float2 x)
{
  return convert_int2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(float2 x)
{
  x = rint(x);
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_int2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(float2 x)
{
  x = ceil(x);
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_int2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(float2 x)
{
  x = floor(x);
  return convert_int2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_int2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(float3 x)
{
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(float3 x)
{
  return convert_int3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(float3 x)
{
  x = rint(x);
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_int3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(float3 x)
{
  x = ceil(x);
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_int3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(float3 x)
{
  x = floor(x);
  return convert_int3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_int3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(float4 x)
{
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(float4 x)
{
  return convert_int4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(float4 x)
{
  x = rint(x);
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_int4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(float4 x)
{
  x = ceil(x);
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_int4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(float4 x)
{
  x = floor(x);
  return convert_int4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_int4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(float8 x)
{
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(float8 x)
{
  return convert_int8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(float8 x)
{
  x = rint(x);
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_int8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(float8 x)
{
  x = ceil(x);
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_int8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(float8 x)
{
  x = floor(x);
  return convert_int8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_int8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(float16 x)
{
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(float16 x)
{
  return convert_int16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(float16 x)
{
  x = rint(x);
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_int16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(float16 x)
{
  x = ceil(x);
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_int16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(float16 x)
{
  x = floor(x);
  return convert_int16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_int16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(float x)
{
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(float x)
{
  return convert_uint_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(float x)
{
  x = rint(x);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(float x)
{
  x = rint(x);
  return convert_uint_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(float x)
{
  x = ceil(x);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(float x)
{
  x = ceil(x);
  return convert_uint_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(float x)
{
  x = floor(x);
  return convert_uint(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(float x)
{
  x = floor(x);
  return convert_uint_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(float2 x)
{
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(float2 x)
{
  return convert_uint2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(float2 x)
{
  x = rint(x);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_uint2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(float2 x)
{
  x = ceil(x);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_uint2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(float2 x)
{
  x = floor(x);
  return convert_uint2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_uint2_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(float3 x)
{
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(float3 x)
{
  return convert_uint3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(float3 x)
{
  x = rint(x);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_uint3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(float3 x)
{
  x = ceil(x);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_uint3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(float3 x)
{
  x = floor(x);
  return convert_uint3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_uint3_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(float4 x)
{
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(float4 x)
{
  return convert_uint4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(float4 x)
{
  x = rint(x);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_uint4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(float4 x)
{
  x = ceil(x);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_uint4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(float4 x)
{
  x = floor(x);
  return convert_uint4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_uint4_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(float8 x)
{
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(float8 x)
{
  return convert_uint8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(float8 x)
{
  x = rint(x);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_uint8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(float8 x)
{
  x = ceil(x);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_uint8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(float8 x)
{
  x = floor(x);
  return convert_uint8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_uint8_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(float16 x)
{
  return convert_uint16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(float16 x)
{
  return convert_uint16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(float16 x)
{
  x = rint(x);
  return convert_uint16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_uint16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(float16 x)
{
  x = ceil(x);
  return convert_uint16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_uint16_sat(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(float16 x)
{
  x = floor(x);
  return convert_uint16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_uint16_sat(x);
}

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(float x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(float x)
{
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(float x)
{
  x = rint(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(float x)
{
  x = rint(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(float x)
{
  x = ceil(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(float x)
{
  x = ceil(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(float x)
{
  x = floor(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(float x)
{
  x = floor(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(float2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(float2 x)
{
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(float2 x)
{
  x = rint(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(float2 x)
{
  x = ceil(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(float2 x)
{
  x = floor(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(float3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(float3 x)
{
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(float3 x)
{
  x = rint(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(float3 x)
{
  x = ceil(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(float3 x)
{
  x = floor(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(float4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(float4 x)
{
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(float4 x)
{
  x = rint(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(float4 x)
{
  x = ceil(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(float4 x)
{
  x = floor(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(float8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(float8 x)
{
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(float8 x)
{
  x = rint(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(float8 x)
{
  x = ceil(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(float8 x)
{
  x = floor(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(float16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(float16 x)
{
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(float16 x)
{
  x = rint(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(float16 x)
{
  x = ceil(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(float16 x)
{
  x = floor(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(float x)
{
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(float x)
{
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(float x)
{
  x = rint(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(float x)
{
  x = rint(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(float x)
{
  x = ceil(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(float x)
{
  x = ceil(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(float x)
{
  x = floor(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(float x)
{
  x = floor(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(float2 x)
{
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(float2 x)
{
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(float2 x)
{
  x = rint(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(float2 x)
{
  x = rint(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(float2 x)
{
  x = ceil(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(float2 x)
{
  x = ceil(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(float2 x)
{
  x = floor(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(float2 x)
{
  x = floor(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(float3 x)
{
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(float3 x)
{
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(float3 x)
{
  x = rint(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(float3 x)
{
  x = rint(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(float3 x)
{
  x = ceil(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(float3 x)
{
  x = ceil(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(float3 x)
{
  x = floor(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(float3 x)
{
  x = floor(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(float4 x)
{
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(float4 x)
{
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(float4 x)
{
  x = rint(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(float4 x)
{
  x = rint(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(float4 x)
{
  x = ceil(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(float4 x)
{
  x = ceil(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(float4 x)
{
  x = floor(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(float4 x)
{
  x = floor(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(float8 x)
{
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(float8 x)
{
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(float8 x)
{
  x = rint(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(float8 x)
{
  x = rint(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(float8 x)
{
  x = ceil(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(float8 x)
{
  x = ceil(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(float8 x)
{
  x = floor(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(float8 x)
{
  x = floor(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(float16 x)
{
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(float16 x)
{
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(float16 x)
{
  x = rint(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(float16 x)
{
  x = rint(x);
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(float16 x)
{
  x = ceil(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(float16 x)
{
  x = ceil(x);
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(float16 x)
{
  x = floor(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(float16 x)
{
  x = floor(x);
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtz(double x)
{
  return convert_char(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtz(double x)
{
  return convert_char_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rte(double x)
{
  x = rint(x);
  return convert_char(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rte(double x)
{
  x = rint(x);
  return convert_char_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtp(double x)
{
  x = ceil(x);
  return convert_char(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtp(double x)
{
  x = ceil(x);
  return convert_char_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_rtn(double x)
{
  x = floor(x);
  return convert_char(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char convert_char_sat_rtn(double x)
{
  x = floor(x);
  return convert_char_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtz(double2 x)
{
  return convert_char2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtz(double2 x)
{
  return convert_char2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rte(double2 x)
{
  x = rint(x);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_char2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtp(double2 x)
{
  x = ceil(x);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_char2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_rtn(double2 x)
{
  x = floor(x);
  return convert_char2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char2 convert_char2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_char2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtz(double3 x)
{
  return convert_char3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtz(double3 x)
{
  return convert_char3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rte(double3 x)
{
  x = rint(x);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_char3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtp(double3 x)
{
  x = ceil(x);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_char3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_rtn(double3 x)
{
  x = floor(x);
  return convert_char3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char3 convert_char3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_char3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtz(double4 x)
{
  return convert_char4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtz(double4 x)
{
  return convert_char4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rte(double4 x)
{
  x = rint(x);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_char4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtp(double4 x)
{
  x = ceil(x);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_char4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_rtn(double4 x)
{
  x = floor(x);
  return convert_char4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char4 convert_char4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_char4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtz(double8 x)
{
  return convert_char8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtz(double8 x)
{
  return convert_char8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rte(double8 x)
{
  x = rint(x);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_char8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtp(double8 x)
{
  x = ceil(x);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_char8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_rtn(double8 x)
{
  x = floor(x);
  return convert_char8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char8 convert_char8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_char8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtz(double16 x)
{
  return convert_char16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtz(double16 x)
{
  return convert_char16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rte(double16 x)
{
  x = rint(x);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_char16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtp(double16 x)
{
  x = ceil(x);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_char16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_rtn(double16 x)
{
  x = floor(x);
  return convert_char16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
char16 convert_char16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_char16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtz(double x)
{
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtz(double x)
{
  return convert_uchar_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rte(double x)
{
  x = rint(x);
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rte(double x)
{
  x = rint(x);
  return convert_uchar_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtp(double x)
{
  x = ceil(x);
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtp(double x)
{
  x = ceil(x);
  return convert_uchar_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_rtn(double x)
{
  x = floor(x);
  return convert_uchar(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar convert_uchar_sat_rtn(double x)
{
  x = floor(x);
  return convert_uchar_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtz(double2 x)
{
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtz(double2 x)
{
  return convert_uchar2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rte(double2 x)
{
  x = rint(x);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_uchar2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtp(double2 x)
{
  x = ceil(x);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_uchar2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_rtn(double2 x)
{
  x = floor(x);
  return convert_uchar2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar2 convert_uchar2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_uchar2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtz(double3 x)
{
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtz(double3 x)
{
  return convert_uchar3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rte(double3 x)
{
  x = rint(x);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_uchar3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtp(double3 x)
{
  x = ceil(x);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_uchar3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_rtn(double3 x)
{
  x = floor(x);
  return convert_uchar3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar3 convert_uchar3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_uchar3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtz(double4 x)
{
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtz(double4 x)
{
  return convert_uchar4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rte(double4 x)
{
  x = rint(x);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_uchar4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtp(double4 x)
{
  x = ceil(x);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_uchar4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_rtn(double4 x)
{
  x = floor(x);
  return convert_uchar4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar4 convert_uchar4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_uchar4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtz(double8 x)
{
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtz(double8 x)
{
  return convert_uchar8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rte(double8 x)
{
  x = rint(x);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_uchar8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtp(double8 x)
{
  x = ceil(x);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_uchar8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_rtn(double8 x)
{
  x = floor(x);
  return convert_uchar8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar8 convert_uchar8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_uchar8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtz(double16 x)
{
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtz(double16 x)
{
  return convert_uchar16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rte(double16 x)
{
  x = rint(x);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_uchar16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtp(double16 x)
{
  x = ceil(x);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_uchar16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_rtn(double16 x)
{
  x = floor(x);
  return convert_uchar16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uchar16 convert_uchar16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_uchar16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtz(double x)
{
  return convert_short(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtz(double x)
{
  return convert_short_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rte(double x)
{
  x = rint(x);
  return convert_short(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rte(double x)
{
  x = rint(x);
  return convert_short_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtp(double x)
{
  x = ceil(x);
  return convert_short(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtp(double x)
{
  x = ceil(x);
  return convert_short_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_rtn(double x)
{
  x = floor(x);
  return convert_short(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short convert_short_sat_rtn(double x)
{
  x = floor(x);
  return convert_short_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtz(double2 x)
{
  return convert_short2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtz(double2 x)
{
  return convert_short2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rte(double2 x)
{
  x = rint(x);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_short2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtp(double2 x)
{
  x = ceil(x);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_short2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_rtn(double2 x)
{
  x = floor(x);
  return convert_short2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short2 convert_short2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_short2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtz(double3 x)
{
  return convert_short3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtz(double3 x)
{
  return convert_short3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rte(double3 x)
{
  x = rint(x);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_short3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtp(double3 x)
{
  x = ceil(x);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_short3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_rtn(double3 x)
{
  x = floor(x);
  return convert_short3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short3 convert_short3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_short3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtz(double4 x)
{
  return convert_short4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtz(double4 x)
{
  return convert_short4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rte(double4 x)
{
  x = rint(x);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_short4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtp(double4 x)
{
  x = ceil(x);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_short4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_rtn(double4 x)
{
  x = floor(x);
  return convert_short4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short4 convert_short4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_short4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtz(double8 x)
{
  return convert_short8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtz(double8 x)
{
  return convert_short8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rte(double8 x)
{
  x = rint(x);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_short8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtp(double8 x)
{
  x = ceil(x);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_short8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_rtn(double8 x)
{
  x = floor(x);
  return convert_short8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short8 convert_short8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_short8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtz(double16 x)
{
  return convert_short16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtz(double16 x)
{
  return convert_short16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rte(double16 x)
{
  x = rint(x);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_short16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtp(double16 x)
{
  x = ceil(x);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_short16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_rtn(double16 x)
{
  x = floor(x);
  return convert_short16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
short16 convert_short16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_short16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtz(double x)
{
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtz(double x)
{
  return convert_ushort_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rte(double x)
{
  x = rint(x);
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rte(double x)
{
  x = rint(x);
  return convert_ushort_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtp(double x)
{
  x = ceil(x);
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtp(double x)
{
  x = ceil(x);
  return convert_ushort_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_rtn(double x)
{
  x = floor(x);
  return convert_ushort(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort convert_ushort_sat_rtn(double x)
{
  x = floor(x);
  return convert_ushort_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtz(double2 x)
{
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtz(double2 x)
{
  return convert_ushort2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rte(double2 x)
{
  x = rint(x);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_ushort2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtp(double2 x)
{
  x = ceil(x);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_ushort2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_rtn(double2 x)
{
  x = floor(x);
  return convert_ushort2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort2 convert_ushort2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_ushort2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtz(double3 x)
{
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtz(double3 x)
{
  return convert_ushort3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rte(double3 x)
{
  x = rint(x);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_ushort3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtp(double3 x)
{
  x = ceil(x);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_ushort3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_rtn(double3 x)
{
  x = floor(x);
  return convert_ushort3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort3 convert_ushort3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_ushort3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtz(double4 x)
{
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtz(double4 x)
{
  return convert_ushort4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rte(double4 x)
{
  x = rint(x);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_ushort4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtp(double4 x)
{
  x = ceil(x);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_ushort4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_rtn(double4 x)
{
  x = floor(x);
  return convert_ushort4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort4 convert_ushort4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_ushort4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtz(double8 x)
{
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtz(double8 x)
{
  return convert_ushort8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rte(double8 x)
{
  x = rint(x);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_ushort8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtp(double8 x)
{
  x = ceil(x);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_ushort8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_rtn(double8 x)
{
  x = floor(x);
  return convert_ushort8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort8 convert_ushort8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_ushort8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtz(double16 x)
{
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtz(double16 x)
{
  return convert_ushort16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rte(double16 x)
{
  x = rint(x);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_ushort16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtp(double16 x)
{
  x = ceil(x);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_ushort16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_rtn(double16 x)
{
  x = floor(x);
  return convert_ushort16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ushort16 convert_ushort16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_ushort16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtz(double x)
{
  return convert_int(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtz(double x)
{
  return convert_int_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rte(double x)
{
  x = rint(x);
  return convert_int(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rte(double x)
{
  x = rint(x);
  return convert_int_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtp(double x)
{
  x = ceil(x);
  return convert_int(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtp(double x)
{
  x = ceil(x);
  return convert_int_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_rtn(double x)
{
  x = floor(x);
  return convert_int(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int convert_int_sat_rtn(double x)
{
  x = floor(x);
  return convert_int_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtz(double2 x)
{
  return convert_int2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtz(double2 x)
{
  return convert_int2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rte(double2 x)
{
  x = rint(x);
  return convert_int2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_int2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtp(double2 x)
{
  x = ceil(x);
  return convert_int2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_int2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_rtn(double2 x)
{
  x = floor(x);
  return convert_int2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int2 convert_int2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_int2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtz(double3 x)
{
  return convert_int3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtz(double3 x)
{
  return convert_int3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rte(double3 x)
{
  x = rint(x);
  return convert_int3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_int3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtp(double3 x)
{
  x = ceil(x);
  return convert_int3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_int3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_rtn(double3 x)
{
  x = floor(x);
  return convert_int3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int3 convert_int3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_int3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtz(double4 x)
{
  return convert_int4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtz(double4 x)
{
  return convert_int4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rte(double4 x)
{
  x = rint(x);
  return convert_int4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_int4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtp(double4 x)
{
  x = ceil(x);
  return convert_int4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_int4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_rtn(double4 x)
{
  x = floor(x);
  return convert_int4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int4 convert_int4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_int4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtz(double8 x)
{
  return convert_int8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtz(double8 x)
{
  return convert_int8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rte(double8 x)
{
  x = rint(x);
  return convert_int8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_int8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtp(double8 x)
{
  x = ceil(x);
  return convert_int8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_int8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_rtn(double8 x)
{
  x = floor(x);
  return convert_int8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int8 convert_int8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_int8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtz(double16 x)
{
  return convert_int16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtz(double16 x)
{
  return convert_int16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rte(double16 x)
{
  x = rint(x);
  return convert_int16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_int16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtp(double16 x)
{
  x = ceil(x);
  return convert_int16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_int16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_rtn(double16 x)
{
  x = floor(x);
  return convert_int16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
int16 convert_int16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_int16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtz(double x)
{
  return convert_uint(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtz(double x)
{
  return convert_uint_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rte(double x)
{
  x = rint(x);
  return convert_uint(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rte(double x)
{
  x = rint(x);
  return convert_uint_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtp(double x)
{
  x = ceil(x);
  return convert_uint(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtp(double x)
{
  x = ceil(x);
  return convert_uint_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_rtn(double x)
{
  x = floor(x);
  return convert_uint(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint convert_uint_sat_rtn(double x)
{
  x = floor(x);
  return convert_uint_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtz(double2 x)
{
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtz(double2 x)
{
  return convert_uint2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rte(double2 x)
{
  x = rint(x);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_uint2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtp(double2 x)
{
  x = ceil(x);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_uint2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_rtn(double2 x)
{
  x = floor(x);
  return convert_uint2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint2 convert_uint2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_uint2_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtz(double3 x)
{
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtz(double3 x)
{
  return convert_uint3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rte(double3 x)
{
  x = rint(x);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_uint3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtp(double3 x)
{
  x = ceil(x);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_uint3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_rtn(double3 x)
{
  x = floor(x);
  return convert_uint3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint3 convert_uint3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_uint3_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtz(double4 x)
{
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtz(double4 x)
{
  return convert_uint4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rte(double4 x)
{
  x = rint(x);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_uint4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtp(double4 x)
{
  x = ceil(x);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_uint4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_rtn(double4 x)
{
  x = floor(x);
  return convert_uint4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint4 convert_uint4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_uint4_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtz(double8 x)
{
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtz(double8 x)
{
  return convert_uint8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rte(double8 x)
{
  x = rint(x);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_uint8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtp(double8 x)
{
  x = ceil(x);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_uint8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_rtn(double8 x)
{
  x = floor(x);
  return convert_uint8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint8 convert_uint8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_uint8_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtz(double16 x)
{
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtz(double16 x)
{
  return convert_uint16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rte(double16 x)
{
  x = rint(x);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_uint16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtp(double16 x)
{
  x = ceil(x);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_uint16_sat(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_rtn(double16 x)
{
  x = floor(x);
  return convert_uint16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
uint16 convert_uint16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_uint16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtz(double x)
{
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtz(double x)
{
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rte(double x)
{
  x = rint(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rte(double x)
{
  x = rint(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtp(double x)
{
  x = ceil(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtp(double x)
{
  x = ceil(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_rtn(double x)
{
  x = floor(x);
  return convert_long(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long convert_long_sat_rtn(double x)
{
  x = floor(x);
  return convert_long_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtz(double2 x)
{
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtz(double2 x)
{
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rte(double2 x)
{
  x = rint(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtp(double2 x)
{
  x = ceil(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_rtn(double2 x)
{
  x = floor(x);
  return convert_long2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long2 convert_long2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_long2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtz(double3 x)
{
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtz(double3 x)
{
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rte(double3 x)
{
  x = rint(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtp(double3 x)
{
  x = ceil(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_rtn(double3 x)
{
  x = floor(x);
  return convert_long3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long3 convert_long3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_long3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtz(double4 x)
{
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtz(double4 x)
{
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rte(double4 x)
{
  x = rint(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtp(double4 x)
{
  x = ceil(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_rtn(double4 x)
{
  x = floor(x);
  return convert_long4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long4 convert_long4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_long4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtz(double8 x)
{
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtz(double8 x)
{
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rte(double8 x)
{
  x = rint(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtp(double8 x)
{
  x = ceil(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_rtn(double8 x)
{
  x = floor(x);
  return convert_long8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long8 convert_long8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_long8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtz(double16 x)
{
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtz(double16 x)
{
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rte(double16 x)
{
  x = rint(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtp(double16 x)
{
  x = ceil(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_rtn(double16 x)
{
  x = floor(x);
  return convert_long16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
long16 convert_long16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_long16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtz(double x)
{
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtz(double x)
{
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rte(double x)
{
  x = rint(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rte(double x)
{
  x = rint(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtp(double x)
{
  x = ceil(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtp(double x)
{
  x = ceil(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_rtn(double x)
{
  x = floor(x);
  return convert_ulong(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong convert_ulong_sat_rtn(double x)
{
  x = floor(x);
  return convert_ulong_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtz(double2 x)
{
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtz(double2 x)
{
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rte(double2 x)
{
  x = rint(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rte(double2 x)
{
  x = rint(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtp(double2 x)
{
  x = ceil(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtp(double2 x)
{
  x = ceil(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_rtn(double2 x)
{
  x = floor(x);
  return convert_ulong2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong2 convert_ulong2_sat_rtn(double2 x)
{
  x = floor(x);
  return convert_ulong2_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtz(double3 x)
{
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtz(double3 x)
{
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rte(double3 x)
{
  x = rint(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rte(double3 x)
{
  x = rint(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtp(double3 x)
{
  x = ceil(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtp(double3 x)
{
  x = ceil(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_rtn(double3 x)
{
  x = floor(x);
  return convert_ulong3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong3 convert_ulong3_sat_rtn(double3 x)
{
  x = floor(x);
  return convert_ulong3_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtz(double4 x)
{
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtz(double4 x)
{
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rte(double4 x)
{
  x = rint(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rte(double4 x)
{
  x = rint(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtp(double4 x)
{
  x = ceil(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtp(double4 x)
{
  x = ceil(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_rtn(double4 x)
{
  x = floor(x);
  return convert_ulong4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong4 convert_ulong4_sat_rtn(double4 x)
{
  x = floor(x);
  return convert_ulong4_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtz(double8 x)
{
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtz(double8 x)
{
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rte(double8 x)
{
  x = rint(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rte(double8 x)
{
  x = rint(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtp(double8 x)
{
  x = ceil(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtp(double8 x)
{
  x = ceil(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_rtn(double8 x)
{
  x = floor(x);
  return convert_ulong8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong8 convert_ulong8_sat_rtn(double8 x)
{
  x = floor(x);
  return convert_ulong8_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtz(double16 x)
{
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtz(double16 x)
{
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rte(double16 x)
{
  x = rint(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rte(double16 x)
{
  x = rint(x);
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtp(double16 x)
{
  x = ceil(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtp(double16 x)
{
  x = ceil(x);
  return convert_ulong16_sat(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_rtn(double16 x)
{
  x = floor(x);
  return convert_ulong16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
ulong16 convert_ulong16_sat_rtn(double16 x)
{
  x = floor(x);
  return convert_ulong16_sat(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(char x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(char x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(char x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(char x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(char2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(char2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(char2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(char2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(char3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(char3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(char3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(char3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(char4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(char4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(char4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(char4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(char8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(char8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(char8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(char8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(char16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(char16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(char16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(char16 x)
{
  return convert_float16(x);
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(char x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(char x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(char x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(char x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(char2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(char2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(char2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(char2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(char3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(char3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(char3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(char3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(char4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(char4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(char4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(char4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(char8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(char8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(char8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(char8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(char16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(char16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(char16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(char16 x)
{
  return convert_double16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(uchar x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(uchar x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(uchar x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(uchar x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(uchar2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(uchar2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(uchar2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(uchar2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(uchar3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(uchar3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(uchar3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(uchar3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(uchar4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(uchar4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(uchar4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(uchar4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(uchar8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(uchar8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(uchar8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(uchar8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(uchar16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(uchar16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(uchar16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(uchar16 x)
{
  return convert_float16(x);
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(uchar x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(uchar x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(uchar x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(uchar x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(uchar2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(uchar2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(uchar2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(uchar2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(uchar3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(uchar3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(uchar3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(uchar3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(uchar4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(uchar4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(uchar4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(uchar4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(uchar8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(uchar8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(uchar8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(uchar8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(uchar16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(uchar16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(uchar16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(uchar16 x)
{
  return convert_double16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(short x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(short x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(short x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(short x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(short2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(short2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(short2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(short2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(short3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(short3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(short3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(short3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(short4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(short4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(short4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(short4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(short8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(short8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(short8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(short8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(short16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(short16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(short16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(short16 x)
{
  return convert_float16(x);
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(short x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(short x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(short x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(short x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(short2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(short2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(short2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(short2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(short3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(short3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(short3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(short3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(short4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(short4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(short4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(short4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(short8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(short8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(short8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(short8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(short16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(short16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(short16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(short16 x)
{
  return convert_double16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(ushort x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(ushort x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(ushort x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(ushort x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(ushort2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(ushort2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(ushort2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(ushort2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(ushort3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(ushort3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(ushort3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(ushort3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(ushort4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(ushort4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(ushort4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(ushort4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(ushort8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(ushort8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(ushort8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(ushort8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(ushort16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(ushort16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(ushort16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(ushort16 x)
{
  return convert_float16(x);
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(ushort x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(ushort x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(ushort x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(ushort x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(ushort2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(ushort2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(ushort2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(ushort2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(ushort3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(ushort3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(ushort3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(ushort3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(ushort4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(ushort4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(ushort4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(ushort4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(ushort8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(ushort8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(ushort8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(ushort8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(ushort16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(ushort16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(ushort16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(ushort16 x)
{
  return convert_double16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(int x)
{
  float r = convert_float(x);
  int y = convert_int_sat(r);
  uint abs_x = abs(x);
  uint abs_y = abs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return select(res, (float)(0x1.fffffep+30f), convert_int(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(int x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(int x)
{
  float r = convert_float(x);
  int y = convert_int_sat(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(int x)
{
  float r = convert_float(x);
  int y = convert_int_sat(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return select(res, (float)(0x1.fffffep+30f), convert_int(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(int2 x)
{
  float2 r = convert_float2(x);
  int2 y = convert_int2_sat(r);
  uint2 abs_x = abs(x);
  uint2 abs_y = abs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return select(res, (float2)(0x1.fffffep+30f), convert_int2(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(int2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(int2 x)
{
  float2 r = convert_float2(x);
  int2 y = convert_int2_sat(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(int2 x)
{
  float2 r = convert_float2(x);
  int2 y = convert_int2_sat(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return select(res, (float2)(0x1.fffffep+30f), convert_int2(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(int3 x)
{
  float3 r = convert_float3(x);
  int3 y = convert_int3_sat(r);
  uint3 abs_x = abs(x);
  uint3 abs_y = abs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return select(res, (float3)(0x1.fffffep+30f), convert_int3(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(int3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(int3 x)
{
  float3 r = convert_float3(x);
  int3 y = convert_int3_sat(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(int3 x)
{
  float3 r = convert_float3(x);
  int3 y = convert_int3_sat(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return select(res, (float3)(0x1.fffffep+30f), convert_int3(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(int4 x)
{
  float4 r = convert_float4(x);
  int4 y = convert_int4_sat(r);
  uint4 abs_x = abs(x);
  uint4 abs_y = abs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return select(res, (float4)(0x1.fffffep+30f), convert_int4(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(int4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(int4 x)
{
  float4 r = convert_float4(x);
  int4 y = convert_int4_sat(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(int4 x)
{
  float4 r = convert_float4(x);
  int4 y = convert_int4_sat(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return select(res, (float4)(0x1.fffffep+30f), convert_int4(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(int8 x)
{
  float8 r = convert_float8(x);
  int8 y = convert_int8_sat(r);
  uint8 abs_x = abs(x);
  uint8 abs_y = abs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return select(res, (float8)(0x1.fffffep+30f), convert_int8(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(int8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(int8 x)
{
  float8 r = convert_float8(x);
  int8 y = convert_int8_sat(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(int8 x)
{
  float8 r = convert_float8(x);
  int8 y = convert_int8_sat(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return select(res, (float8)(0x1.fffffep+30f), convert_int8(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(int16 x)
{
  float16 r = convert_float16(x);
  int16 y = convert_int16_sat(r);
  uint16 abs_x = abs(x);
  uint16 abs_y = abs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return select(res, (float16)(0x1.fffffep+30f), convert_int16(x >= 0x7ffffffc));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(int16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(int16 x)
{
  float16 r = convert_float16(x);
  int16 y = convert_int16_sat(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(int16 x)
{
  float16 r = convert_float16(x);
  int16 y = convert_int16_sat(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return select(res, (float16)(0x1.fffffep+30f), convert_int16(x >= 0x7ffffffc));
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(int x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(int x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(int x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(int x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(int2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(int2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(int2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(int2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(int3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(int3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(int3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(int3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(int4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(int4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(int4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(int4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(int8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(int8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(int8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(int8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(int16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(int16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(int16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(int16 x)
{
  return convert_double16(x);
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(uint x)
{
  float r = convert_float(x);
  uint y = convert_uint_sat(r);
  uint abs_x = abs(x);
  uint abs_y = abs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return select(res, (float)(0x1.fffffep+31f), convert_int(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(uint x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(uint x)
{
  float r = convert_float(x);
  uint y = convert_uint_sat(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(uint x)
{
  float r = convert_float(x);
  uint y = convert_uint_sat(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return select(res, (float)(0x1.fffffep+31f), convert_int(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(uint2 x)
{
  float2 r = convert_float2(x);
  uint2 y = convert_uint2_sat(r);
  uint2 abs_x = abs(x);
  uint2 abs_y = abs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return select(res, (float2)(0x1.fffffep+31f), convert_int2(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(uint2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(uint2 x)
{
  float2 r = convert_float2(x);
  uint2 y = convert_uint2_sat(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(uint2 x)
{
  float2 r = convert_float2(x);
  uint2 y = convert_uint2_sat(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return select(res, (float2)(0x1.fffffep+31f), convert_int2(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(uint3 x)
{
  float3 r = convert_float3(x);
  uint3 y = convert_uint3_sat(r);
  uint3 abs_x = abs(x);
  uint3 abs_y = abs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return select(res, (float3)(0x1.fffffep+31f), convert_int3(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(uint3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(uint3 x)
{
  float3 r = convert_float3(x);
  uint3 y = convert_uint3_sat(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(uint3 x)
{
  float3 r = convert_float3(x);
  uint3 y = convert_uint3_sat(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return select(res, (float3)(0x1.fffffep+31f), convert_int3(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(uint4 x)
{
  float4 r = convert_float4(x);
  uint4 y = convert_uint4_sat(r);
  uint4 abs_x = abs(x);
  uint4 abs_y = abs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return select(res, (float4)(0x1.fffffep+31f), convert_int4(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(uint4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(uint4 x)
{
  float4 r = convert_float4(x);
  uint4 y = convert_uint4_sat(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(uint4 x)
{
  float4 r = convert_float4(x);
  uint4 y = convert_uint4_sat(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return select(res, (float4)(0x1.fffffep+31f), convert_int4(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(uint8 x)
{
  float8 r = convert_float8(x);
  uint8 y = convert_uint8_sat(r);
  uint8 abs_x = abs(x);
  uint8 abs_y = abs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return select(res, (float8)(0x1.fffffep+31f), convert_int8(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(uint8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(uint8 x)
{
  float8 r = convert_float8(x);
  uint8 y = convert_uint8_sat(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(uint8 x)
{
  float8 r = convert_float8(x);
  uint8 y = convert_uint8_sat(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return select(res, (float8)(0x1.fffffep+31f), convert_int8(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(uint16 x)
{
  float16 r = convert_float16(x);
  uint16 y = convert_uint16_sat(r);
  uint16 abs_x = abs(x);
  uint16 abs_y = abs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return select(res, (float16)(0x1.fffffep+31f), convert_int16(x >= 0xffffff80));
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(uint16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(uint16 x)
{
  float16 r = convert_float16(x);
  uint16 y = convert_uint16_sat(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(uint16 x)
{
  float16 r = convert_float16(x);
  uint16 y = convert_uint16_sat(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return select(res, (float16)(0x1.fffffep+31f), convert_int16(x >= 0xffffff80));
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(uint x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(uint x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(uint x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(uint x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(uint2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(uint2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(uint2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(uint2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(uint3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(uint3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(uint3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(uint3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(uint4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(uint4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(uint4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(uint4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(uint8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(uint8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(uint8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(uint8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(uint16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(uint16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(uint16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(uint16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(long x)
{
  float r = convert_float(x);
  long y = convert_long_sat(r);
  ulong abs_x = abs(x);
  ulong abs_y = abs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return select(res, (float)(0x1.fffffep+62f), convert_int(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(long x)
{
  return convert_float(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(long x)
{
  float r = convert_float(x);
  long y = convert_long_sat(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(long x)
{
  float r = convert_float(x);
  long y = convert_long_sat(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return select(res, (float)(0x1.fffffep+62f), convert_int(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(long2 x)
{
  float2 r = convert_float2(x);
  long2 y = convert_long2_sat(r);
  ulong2 abs_x = abs(x);
  ulong2 abs_y = abs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return select(res, (float2)(0x1.fffffep+62f), convert_int2(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(long2 x)
{
  return convert_float2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(long2 x)
{
  float2 r = convert_float2(x);
  long2 y = convert_long2_sat(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(long2 x)
{
  float2 r = convert_float2(x);
  long2 y = convert_long2_sat(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return select(res, (float2)(0x1.fffffep+62f), convert_int2(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(long3 x)
{
  float3 r = convert_float3(x);
  long3 y = convert_long3_sat(r);
  ulong3 abs_x = abs(x);
  ulong3 abs_y = abs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return select(res, (float3)(0x1.fffffep+62f), convert_int3(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(long3 x)
{
  return convert_float3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(long3 x)
{
  float3 r = convert_float3(x);
  long3 y = convert_long3_sat(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(long3 x)
{
  float3 r = convert_float3(x);
  long3 y = convert_long3_sat(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return select(res, (float3)(0x1.fffffep+62f), convert_int3(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(long4 x)
{
  float4 r = convert_float4(x);
  long4 y = convert_long4_sat(r);
  ulong4 abs_x = abs(x);
  ulong4 abs_y = abs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return select(res, (float4)(0x1.fffffep+62f), convert_int4(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(long4 x)
{
  return convert_float4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(long4 x)
{
  float4 r = convert_float4(x);
  long4 y = convert_long4_sat(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(long4 x)
{
  float4 r = convert_float4(x);
  long4 y = convert_long4_sat(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return select(res, (float4)(0x1.fffffep+62f), convert_int4(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(long8 x)
{
  float8 r = convert_float8(x);
  long8 y = convert_long8_sat(r);
  ulong8 abs_x = abs(x);
  ulong8 abs_y = abs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return select(res, (float8)(0x1.fffffep+62f), convert_int8(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(long8 x)
{
  return convert_float8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(long8 x)
{
  float8 r = convert_float8(x);
  long8 y = convert_long8_sat(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(long8 x)
{
  float8 r = convert_float8(x);
  long8 y = convert_long8_sat(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return select(res, (float8)(0x1.fffffep+62f), convert_int8(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(long16 x)
{
  float16 r = convert_float16(x);
  long16 y = convert_long16_sat(r);
  ulong16 abs_x = abs(x);
  ulong16 abs_y = abs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return select(res, (float16)(0x1.fffffep+62f), convert_int16(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(long16 x)
{
  return convert_float16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(long16 x)
{
  float16 r = convert_float16(x);
  long16 y = convert_long16_sat(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(long16 x)
{
  float16 r = convert_float16(x);
  long16 y = convert_long16_sat(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return select(res, (float16)(0x1.fffffep+62f), convert_int16(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(long x)
{
  double r = convert_double(x);
  long y = convert_long_sat(r);
  ulong abs_x = abs(x);
  ulong abs_y = abs(y);
  double res = select(r, nextafter(r, sign(r) * (double)-INFINITY), convert_long(abs_y > abs_x));
  return select(res, (double)(0x1.fffffffffffffp+62), convert_long(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(long x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(long x)
{
  double r = convert_double(x);
  long y = convert_long_sat(r);
  double res = select(r, nextafter(r, (double)INFINITY), convert_long(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(long x)
{
  double r = convert_double(x);
  long y = convert_long_sat(r);
  double res = select(r, nextafter(r, (double)-INFINITY), convert_long(y > x));
  return select(res, (double)(0x1.fffffffffffffp+62), convert_long(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(long2 x)
{
  double2 r = convert_double2(x);
  long2 y = convert_long2_sat(r);
  ulong2 abs_x = abs(x);
  ulong2 abs_y = abs(y);
  double2 res = select(r, nextafter(r, sign(r) * (double2)-INFINITY), convert_long2(abs_y > abs_x));
  return select(res, (double2)(0x1.fffffffffffffp+62), convert_long2(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(long2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(long2 x)
{
  double2 r = convert_double2(x);
  long2 y = convert_long2_sat(r);
  double2 res = select(r, nextafter(r, (double2)INFINITY), convert_long2(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(long2 x)
{
  double2 r = convert_double2(x);
  long2 y = convert_long2_sat(r);
  double2 res = select(r, nextafter(r, (double2)-INFINITY), convert_long2(y > x));
  return select(res, (double2)(0x1.fffffffffffffp+62), convert_long2(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(long3 x)
{
  double3 r = convert_double3(x);
  long3 y = convert_long3_sat(r);
  ulong3 abs_x = abs(x);
  ulong3 abs_y = abs(y);
  double3 res = select(r, nextafter(r, sign(r) * (double3)-INFINITY), convert_long3(abs_y > abs_x));
  return select(res, (double3)(0x1.fffffffffffffp+62), convert_long3(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(long3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(long3 x)
{
  double3 r = convert_double3(x);
  long3 y = convert_long3_sat(r);
  double3 res = select(r, nextafter(r, (double3)INFINITY), convert_long3(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(long3 x)
{
  double3 r = convert_double3(x);
  long3 y = convert_long3_sat(r);
  double3 res = select(r, nextafter(r, (double3)-INFINITY), convert_long3(y > x));
  return select(res, (double3)(0x1.fffffffffffffp+62), convert_long3(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(long4 x)
{
  double4 r = convert_double4(x);
  long4 y = convert_long4_sat(r);
  ulong4 abs_x = abs(x);
  ulong4 abs_y = abs(y);
  double4 res = select(r, nextafter(r, sign(r) * (double4)-INFINITY), convert_long4(abs_y > abs_x));
  return select(res, (double4)(0x1.fffffffffffffp+62), convert_long4(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(long4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(long4 x)
{
  double4 r = convert_double4(x);
  long4 y = convert_long4_sat(r);
  double4 res = select(r, nextafter(r, (double4)INFINITY), convert_long4(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(long4 x)
{
  double4 r = convert_double4(x);
  long4 y = convert_long4_sat(r);
  double4 res = select(r, nextafter(r, (double4)-INFINITY), convert_long4(y > x));
  return select(res, (double4)(0x1.fffffffffffffp+62), convert_long4(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(long8 x)
{
  double8 r = convert_double8(x);
  long8 y = convert_long8_sat(r);
  ulong8 abs_x = abs(x);
  ulong8 abs_y = abs(y);
  double8 res = select(r, nextafter(r, sign(r) * (double8)-INFINITY), convert_long8(abs_y > abs_x));
  return select(res, (double8)(0x1.fffffffffffffp+62), convert_long8(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(long8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(long8 x)
{
  double8 r = convert_double8(x);
  long8 y = convert_long8_sat(r);
  double8 res = select(r, nextafter(r, (double8)INFINITY), convert_long8(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(long8 x)
{
  double8 r = convert_double8(x);
  long8 y = convert_long8_sat(r);
  double8 res = select(r, nextafter(r, (double8)-INFINITY), convert_long8(y > x));
  return select(res, (double8)(0x1.fffffffffffffp+62), convert_long8(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(long16 x)
{
  double16 r = convert_double16(x);
  long16 y = convert_long16_sat(r);
  ulong16 abs_x = abs(x);
  ulong16 abs_y = abs(y);
  double16 res = select(r, nextafter(r, sign(r) * (double16)-INFINITY), convert_long16(abs_y > abs_x));
  return select(res, (double16)(0x1.fffffffffffffp+62), convert_long16(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(long16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(long16 x)
{
  double16 r = convert_double16(x);
  long16 y = convert_long16_sat(r);
  double16 res = select(r, nextafter(r, (double16)INFINITY), convert_long16(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(long16 x)
{
  double16 r = convert_double16(x);
  long16 y = convert_long16_sat(r);
  double16 res = select(r, nextafter(r, (double16)-INFINITY), convert_long16(y > x));
  return select(res, (double16)(0x1.fffffffffffffp+62), convert_long16(x >= 0x7fffffffffffffffL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(ulong x)
{
  float r = convert_float(x);
  ulong y = convert_ulong_sat(r);
  ulong abs_x = abs(x);
  ulong abs_y = abs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return select(res, (float)(0x1.fffffep+63f), convert_int(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(ulong x)
{
  return convert_float(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(ulong x)
{
  float r = convert_float(x);
  ulong y = convert_ulong_sat(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(ulong x)
{
  float r = convert_float(x);
  ulong y = convert_ulong_sat(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return select(res, (float)(0x1.fffffep+63f), convert_int(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(ulong2 x)
{
  float2 r = convert_float2(x);
  ulong2 y = convert_ulong2_sat(r);
  ulong2 abs_x = abs(x);
  ulong2 abs_y = abs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return select(res, (float2)(0x1.fffffep+63f), convert_int2(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(ulong2 x)
{
  return convert_float2(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(ulong2 x)
{
  float2 r = convert_float2(x);
  ulong2 y = convert_ulong2_sat(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(ulong2 x)
{
  float2 r = convert_float2(x);
  ulong2 y = convert_ulong2_sat(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return select(res, (float2)(0x1.fffffep+63f), convert_int2(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(ulong3 x)
{
  float3 r = convert_float3(x);
  ulong3 y = convert_ulong3_sat(r);
  ulong3 abs_x = abs(x);
  ulong3 abs_y = abs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return select(res, (float3)(0x1.fffffep+63f), convert_int3(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(ulong3 x)
{
  return convert_float3(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(ulong3 x)
{
  float3 r = convert_float3(x);
  ulong3 y = convert_ulong3_sat(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(ulong3 x)
{
  float3 r = convert_float3(x);
  ulong3 y = convert_ulong3_sat(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return select(res, (float3)(0x1.fffffep+63f), convert_int3(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(ulong4 x)
{
  float4 r = convert_float4(x);
  ulong4 y = convert_ulong4_sat(r);
  ulong4 abs_x = abs(x);
  ulong4 abs_y = abs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return select(res, (float4)(0x1.fffffep+63f), convert_int4(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(ulong4 x)
{
  return convert_float4(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(ulong4 x)
{
  float4 r = convert_float4(x);
  ulong4 y = convert_ulong4_sat(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(ulong4 x)
{
  float4 r = convert_float4(x);
  ulong4 y = convert_ulong4_sat(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return select(res, (float4)(0x1.fffffep+63f), convert_int4(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(ulong8 x)
{
  float8 r = convert_float8(x);
  ulong8 y = convert_ulong8_sat(r);
  ulong8 abs_x = abs(x);
  ulong8 abs_y = abs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return select(res, (float8)(0x1.fffffep+63f), convert_int8(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(ulong8 x)
{
  return convert_float8(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(ulong8 x)
{
  float8 r = convert_float8(x);
  ulong8 y = convert_ulong8_sat(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(ulong8 x)
{
  float8 r = convert_float8(x);
  ulong8 y = convert_ulong8_sat(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return select(res, (float8)(0x1.fffffep+63f), convert_int8(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(ulong16 x)
{
  float16 r = convert_float16(x);
  ulong16 y = convert_ulong16_sat(r);
  ulong16 abs_x = abs(x);
  ulong16 abs_y = abs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return select(res, (float16)(0x1.fffffep+63f), convert_int16(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(ulong16 x)
{
  return convert_float16(x);
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(ulong16 x)
{
  float16 r = convert_float16(x);
  ulong16 y = convert_ulong16_sat(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(ulong16 x)
{
  float16 r = convert_float16(x);
  ulong16 y = convert_ulong16_sat(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return select(res, (float16)(0x1.fffffep+63f), convert_int16(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(ulong x)
{
  double r = convert_double(x);
  ulong y = convert_ulong_sat(r);
  ulong abs_x = abs(x);
  ulong abs_y = abs(y);
  double res = select(r, nextafter(r, sign(r) * (double)-INFINITY), convert_long(abs_y > abs_x));
  return select(res, (double)(0x1.fffffffffffffp+63), convert_long(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(ulong x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(ulong x)
{
  double r = convert_double(x);
  ulong y = convert_ulong_sat(r);
  double res = select(r, nextafter(r, (double)INFINITY), convert_long(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(ulong x)
{
  double r = convert_double(x);
  ulong y = convert_ulong_sat(r);
  double res = select(r, nextafter(r, (double)-INFINITY), convert_long(y > x));
  return select(res, (double)(0x1.fffffffffffffp+63), convert_long(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(ulong2 x)
{
  double2 r = convert_double2(x);
  ulong2 y = convert_ulong2_sat(r);
  ulong2 abs_x = abs(x);
  ulong2 abs_y = abs(y);
  double2 res = select(r, nextafter(r, sign(r) * (double2)-INFINITY), convert_long2(abs_y > abs_x));
  return select(res, (double2)(0x1.fffffffffffffp+63), convert_long2(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(ulong2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(ulong2 x)
{
  double2 r = convert_double2(x);
  ulong2 y = convert_ulong2_sat(r);
  double2 res = select(r, nextafter(r, (double2)INFINITY), convert_long2(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(ulong2 x)
{
  double2 r = convert_double2(x);
  ulong2 y = convert_ulong2_sat(r);
  double2 res = select(r, nextafter(r, (double2)-INFINITY), convert_long2(y > x));
  return select(res, (double2)(0x1.fffffffffffffp+63), convert_long2(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(ulong3 x)
{
  double3 r = convert_double3(x);
  ulong3 y = convert_ulong3_sat(r);
  ulong3 abs_x = abs(x);
  ulong3 abs_y = abs(y);
  double3 res = select(r, nextafter(r, sign(r) * (double3)-INFINITY), convert_long3(abs_y > abs_x));
  return select(res, (double3)(0x1.fffffffffffffp+63), convert_long3(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(ulong3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(ulong3 x)
{
  double3 r = convert_double3(x);
  ulong3 y = convert_ulong3_sat(r);
  double3 res = select(r, nextafter(r, (double3)INFINITY), convert_long3(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(ulong3 x)
{
  double3 r = convert_double3(x);
  ulong3 y = convert_ulong3_sat(r);
  double3 res = select(r, nextafter(r, (double3)-INFINITY), convert_long3(y > x));
  return select(res, (double3)(0x1.fffffffffffffp+63), convert_long3(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(ulong4 x)
{
  double4 r = convert_double4(x);
  ulong4 y = convert_ulong4_sat(r);
  ulong4 abs_x = abs(x);
  ulong4 abs_y = abs(y);
  double4 res = select(r, nextafter(r, sign(r) * (double4)-INFINITY), convert_long4(abs_y > abs_x));
  return select(res, (double4)(0x1.fffffffffffffp+63), convert_long4(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(ulong4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(ulong4 x)
{
  double4 r = convert_double4(x);
  ulong4 y = convert_ulong4_sat(r);
  double4 res = select(r, nextafter(r, (double4)INFINITY), convert_long4(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(ulong4 x)
{
  double4 r = convert_double4(x);
  ulong4 y = convert_ulong4_sat(r);
  double4 res = select(r, nextafter(r, (double4)-INFINITY), convert_long4(y > x));
  return select(res, (double4)(0x1.fffffffffffffp+63), convert_long4(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(ulong8 x)
{
  double8 r = convert_double8(x);
  ulong8 y = convert_ulong8_sat(r);
  ulong8 abs_x = abs(x);
  ulong8 abs_y = abs(y);
  double8 res = select(r, nextafter(r, sign(r) * (double8)-INFINITY), convert_long8(abs_y > abs_x));
  return select(res, (double8)(0x1.fffffffffffffp+63), convert_long8(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(ulong8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(ulong8 x)
{
  double8 r = convert_double8(x);
  ulong8 y = convert_ulong8_sat(r);
  double8 res = select(r, nextafter(r, (double8)INFINITY), convert_long8(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(ulong8 x)
{
  double8 r = convert_double8(x);
  ulong8 y = convert_ulong8_sat(r);
  double8 res = select(r, nextafter(r, (double8)-INFINITY), convert_long8(y > x));
  return select(res, (double8)(0x1.fffffffffffffp+63), convert_long8(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(ulong16 x)
{
  double16 r = convert_double16(x);
  ulong16 y = convert_ulong16_sat(r);
  ulong16 abs_x = abs(x);
  ulong16 abs_y = abs(y);
  double16 res = select(r, nextafter(r, sign(r) * (double16)-INFINITY), convert_long16(abs_y > abs_x));
  return select(res, (double16)(0x1.fffffffffffffp+63), convert_long16(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(ulong16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(ulong16 x)
{
  double16 r = convert_double16(x);
  ulong16 y = convert_ulong16_sat(r);
  double16 res = select(r, nextafter(r, (double16)INFINITY), convert_long16(y < x));
  return res;
}
#endif

#if defined(cl_khr_int64) && defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(ulong16 x)
{
  double16 r = convert_double16(x);
  ulong16 y = convert_ulong16_sat(r);
  double16 res = select(r, nextafter(r, (double16)-INFINITY), convert_long16(y > x));
  return select(res, (double16)(0x1.fffffffffffffp+63), convert_long16(x >= 0xfffffffffffffffeUL));
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(half x)
{
  float r = convert_float(x);
  half y = convert_half(r);
  half abs_x = fabs(x);
  half abs_y = fabs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(half x)
{
  return convert_float(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(half x)
{
  float r = convert_float(x);
  half y = convert_half(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(half x)
{
  float r = convert_float(x);
  half y = convert_half(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(half2 x)
{
  float2 r = convert_float2(x);
  half2 y = convert_half2(r);
  half2 abs_x = fabs(x);
  half2 abs_y = fabs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(half2 x)
{
  return convert_float2(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(half2 x)
{
  float2 r = convert_float2(x);
  half2 y = convert_half2(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(half2 x)
{
  float2 r = convert_float2(x);
  half2 y = convert_half2(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(half3 x)
{
  float3 r = convert_float3(x);
  half3 y = convert_half3(r);
  half3 abs_x = fabs(x);
  half3 abs_y = fabs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(half3 x)
{
  return convert_float3(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(half3 x)
{
  float3 r = convert_float3(x);
  half3 y = convert_half3(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(half3 x)
{
  float3 r = convert_float3(x);
  half3 y = convert_half3(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(half4 x)
{
  float4 r = convert_float4(x);
  half4 y = convert_half4(r);
  half4 abs_x = fabs(x);
  half4 abs_y = fabs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(half4 x)
{
  return convert_float4(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(half4 x)
{
  float4 r = convert_float4(x);
  half4 y = convert_half4(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(half4 x)
{
  float4 r = convert_float4(x);
  half4 y = convert_half4(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(half8 x)
{
  float8 r = convert_float8(x);
  half8 y = convert_half8(r);
  half8 abs_x = fabs(x);
  half8 abs_y = fabs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(half8 x)
{
  return convert_float8(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(half8 x)
{
  float8 r = convert_float8(x);
  half8 y = convert_half8(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(half8 x)
{
  float8 r = convert_float8(x);
  half8 y = convert_half8(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(half16 x)
{
  float16 r = convert_float16(x);
  half16 y = convert_half16(r);
  half16 abs_x = fabs(x);
  half16 abs_y = fabs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(half16 x)
{
  return convert_float16(x);
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(half16 x)
{
  float16 r = convert_float16(x);
  half16 y = convert_half16(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(half16 x)
{
  float16 r = convert_float16(x);
  half16 y = convert_half16(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(half x)
{
  double r = convert_double(x);
  half y = convert_half(r);
  half abs_x = fabs(x);
  half abs_y = fabs(y);
  double res = select(r, nextafter(r, sign(r) * (double)-INFINITY), convert_long(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(half x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(half x)
{
  double r = convert_double(x);
  half y = convert_half(r);
  double res = select(r, nextafter(r, (double)INFINITY), convert_long(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(half x)
{
  double r = convert_double(x);
  half y = convert_half(r);
  double res = select(r, nextafter(r, (double)-INFINITY), convert_long(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(half2 x)
{
  double2 r = convert_double2(x);
  half2 y = convert_half2(r);
  half2 abs_x = fabs(x);
  half2 abs_y = fabs(y);
  double2 res = select(r, nextafter(r, sign(r) * (double2)-INFINITY), convert_long2(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(half2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(half2 x)
{
  double2 r = convert_double2(x);
  half2 y = convert_half2(r);
  double2 res = select(r, nextafter(r, (double2)INFINITY), convert_long2(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(half2 x)
{
  double2 r = convert_double2(x);
  half2 y = convert_half2(r);
  double2 res = select(r, nextafter(r, (double2)-INFINITY), convert_long2(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(half3 x)
{
  double3 r = convert_double3(x);
  half3 y = convert_half3(r);
  half3 abs_x = fabs(x);
  half3 abs_y = fabs(y);
  double3 res = select(r, nextafter(r, sign(r) * (double3)-INFINITY), convert_long3(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(half3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(half3 x)
{
  double3 r = convert_double3(x);
  half3 y = convert_half3(r);
  double3 res = select(r, nextafter(r, (double3)INFINITY), convert_long3(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(half3 x)
{
  double3 r = convert_double3(x);
  half3 y = convert_half3(r);
  double3 res = select(r, nextafter(r, (double3)-INFINITY), convert_long3(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(half4 x)
{
  double4 r = convert_double4(x);
  half4 y = convert_half4(r);
  half4 abs_x = fabs(x);
  half4 abs_y = fabs(y);
  double4 res = select(r, nextafter(r, sign(r) * (double4)-INFINITY), convert_long4(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(half4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(half4 x)
{
  double4 r = convert_double4(x);
  half4 y = convert_half4(r);
  double4 res = select(r, nextafter(r, (double4)INFINITY), convert_long4(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(half4 x)
{
  double4 r = convert_double4(x);
  half4 y = convert_half4(r);
  double4 res = select(r, nextafter(r, (double4)-INFINITY), convert_long4(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(half8 x)
{
  double8 r = convert_double8(x);
  half8 y = convert_half8(r);
  half8 abs_x = fabs(x);
  half8 abs_y = fabs(y);
  double8 res = select(r, nextafter(r, sign(r) * (double8)-INFINITY), convert_long8(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(half8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(half8 x)
{
  double8 r = convert_double8(x);
  half8 y = convert_half8(r);
  double8 res = select(r, nextafter(r, (double8)INFINITY), convert_long8(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(half8 x)
{
  double8 r = convert_double8(x);
  half8 y = convert_half8(r);
  double8 res = select(r, nextafter(r, (double8)-INFINITY), convert_long8(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(half16 x)
{
  double16 r = convert_double16(x);
  half16 y = convert_half16(r);
  half16 abs_x = fabs(x);
  half16 abs_y = fabs(y);
  double16 res = select(r, nextafter(r, sign(r) * (double16)-INFINITY), convert_long16(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(half16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(half16 x)
{
  double16 r = convert_double16(x);
  half16 y = convert_half16(r);
  double16 res = select(r, nextafter(r, (double16)INFINITY), convert_long16(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64) && defined(cl_khr_fp16)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(half16 x)
{
  double16 r = convert_double16(x);
  half16 y = convert_half16(r);
  double16 res = select(r, nextafter(r, (double16)-INFINITY), convert_long16(y > x));
  return res;
}
#endif

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(float x)
{
  float r = convert_float(x);
  float y = convert_float(r);
  float abs_x = fabs(x);
  float abs_y = fabs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(float x)
{
  return convert_float(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(float x)
{
  float r = convert_float(x);
  float y = convert_float(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(float x)
{
  float r = convert_float(x);
  float y = convert_float(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(float2 x)
{
  float2 r = convert_float2(x);
  float2 y = convert_float2(r);
  float2 abs_x = fabs(x);
  float2 abs_y = fabs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(float2 x)
{
  return convert_float2(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(float2 x)
{
  float2 r = convert_float2(x);
  float2 y = convert_float2(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(float2 x)
{
  float2 r = convert_float2(x);
  float2 y = convert_float2(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(float3 x)
{
  float3 r = convert_float3(x);
  float3 y = convert_float3(r);
  float3 abs_x = fabs(x);
  float3 abs_y = fabs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(float3 x)
{
  return convert_float3(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(float3 x)
{
  float3 r = convert_float3(x);
  float3 y = convert_float3(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(float3 x)
{
  float3 r = convert_float3(x);
  float3 y = convert_float3(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(float4 x)
{
  float4 r = convert_float4(x);
  float4 y = convert_float4(r);
  float4 abs_x = fabs(x);
  float4 abs_y = fabs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(float4 x)
{
  return convert_float4(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(float4 x)
{
  float4 r = convert_float4(x);
  float4 y = convert_float4(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(float4 x)
{
  float4 r = convert_float4(x);
  float4 y = convert_float4(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(float8 x)
{
  float8 r = convert_float8(x);
  float8 y = convert_float8(r);
  float8 abs_x = fabs(x);
  float8 abs_y = fabs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(float8 x)
{
  return convert_float8(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(float8 x)
{
  float8 r = convert_float8(x);
  float8 y = convert_float8(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(float8 x)
{
  float8 r = convert_float8(x);
  float8 y = convert_float8(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(float16 x)
{
  float16 r = convert_float16(x);
  float16 y = convert_float16(r);
  float16 abs_x = fabs(x);
  float16 abs_y = fabs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(float16 x)
{
  return convert_float16(x);
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(float16 x)
{
  float16 r = convert_float16(x);
  float16 y = convert_float16(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}

_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(float16 x)
{
  float16 r = convert_float16(x);
  float16 y = convert_float16(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return res;
}

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(float x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(float x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(float x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(float x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(float2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(float2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(float2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(float2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(float3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(float3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(float3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(float3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(float4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(float4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(float4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(float4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(float8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(float8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(float8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(float8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(float16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(float16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(float16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(float16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtz(double x)
{
  float r = convert_float(x);
  double y = convert_double(r);
  double abs_x = fabs(x);
  double abs_y = fabs(y);
  float res = select(r, nextafter(r, sign(r) * (float)-INFINITY), convert_int(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rte(double x)
{
  return convert_float(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtp(double x)
{
  float r = convert_float(x);
  double y = convert_double(r);
  float res = select(r, nextafter(r, (float)INFINITY), convert_int(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float convert_float_rtn(double x)
{
  float r = convert_float(x);
  double y = convert_double(r);
  float res = select(r, nextafter(r, (float)-INFINITY), convert_int(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtz(double2 x)
{
  float2 r = convert_float2(x);
  double2 y = convert_double2(r);
  double2 abs_x = fabs(x);
  double2 abs_y = fabs(y);
  float2 res = select(r, nextafter(r, sign(r) * (float2)-INFINITY), convert_int2(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rte(double2 x)
{
  return convert_float2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtp(double2 x)
{
  float2 r = convert_float2(x);
  double2 y = convert_double2(r);
  float2 res = select(r, nextafter(r, (float2)INFINITY), convert_int2(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float2 convert_float2_rtn(double2 x)
{
  float2 r = convert_float2(x);
  double2 y = convert_double2(r);
  float2 res = select(r, nextafter(r, (float2)-INFINITY), convert_int2(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtz(double3 x)
{
  float3 r = convert_float3(x);
  double3 y = convert_double3(r);
  double3 abs_x = fabs(x);
  double3 abs_y = fabs(y);
  float3 res = select(r, nextafter(r, sign(r) * (float3)-INFINITY), convert_int3(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rte(double3 x)
{
  return convert_float3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtp(double3 x)
{
  float3 r = convert_float3(x);
  double3 y = convert_double3(r);
  float3 res = select(r, nextafter(r, (float3)INFINITY), convert_int3(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float3 convert_float3_rtn(double3 x)
{
  float3 r = convert_float3(x);
  double3 y = convert_double3(r);
  float3 res = select(r, nextafter(r, (float3)-INFINITY), convert_int3(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtz(double4 x)
{
  float4 r = convert_float4(x);
  double4 y = convert_double4(r);
  double4 abs_x = fabs(x);
  double4 abs_y = fabs(y);
  float4 res = select(r, nextafter(r, sign(r) * (float4)-INFINITY), convert_int4(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rte(double4 x)
{
  return convert_float4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtp(double4 x)
{
  float4 r = convert_float4(x);
  double4 y = convert_double4(r);
  float4 res = select(r, nextafter(r, (float4)INFINITY), convert_int4(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float4 convert_float4_rtn(double4 x)
{
  float4 r = convert_float4(x);
  double4 y = convert_double4(r);
  float4 res = select(r, nextafter(r, (float4)-INFINITY), convert_int4(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtz(double8 x)
{
  float8 r = convert_float8(x);
  double8 y = convert_double8(r);
  double8 abs_x = fabs(x);
  double8 abs_y = fabs(y);
  float8 res = select(r, nextafter(r, sign(r) * (float8)-INFINITY), convert_int8(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rte(double8 x)
{
  return convert_float8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtp(double8 x)
{
  float8 r = convert_float8(x);
  double8 y = convert_double8(r);
  float8 res = select(r, nextafter(r, (float8)INFINITY), convert_int8(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float8 convert_float8_rtn(double8 x)
{
  float8 r = convert_float8(x);
  double8 y = convert_double8(r);
  float8 res = select(r, nextafter(r, (float8)-INFINITY), convert_int8(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtz(double16 x)
{
  float16 r = convert_float16(x);
  double16 y = convert_double16(r);
  double16 abs_x = fabs(x);
  double16 abs_y = fabs(y);
  float16 res = select(r, nextafter(r, sign(r) * (float16)-INFINITY), convert_int16(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rte(double16 x)
{
  return convert_float16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtp(double16 x)
{
  float16 r = convert_float16(x);
  double16 y = convert_double16(r);
  float16 res = select(r, nextafter(r, (float16)INFINITY), convert_int16(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
float16 convert_float16_rtn(double16 x)
{
  float16 r = convert_float16(x);
  double16 y = convert_double16(r);
  float16 res = select(r, nextafter(r, (float16)-INFINITY), convert_int16(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtz(double x)
{
  double r = convert_double(x);
  double y = convert_double(r);
  double abs_x = fabs(x);
  double abs_y = fabs(y);
  double res = select(r, nextafter(r, sign(r) * (double)-INFINITY), convert_long(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rte(double x)
{
  return convert_double(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtp(double x)
{
  double r = convert_double(x);
  double y = convert_double(r);
  double res = select(r, nextafter(r, (double)INFINITY), convert_long(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double convert_double_rtn(double x)
{
  double r = convert_double(x);
  double y = convert_double(r);
  double res = select(r, nextafter(r, (double)-INFINITY), convert_long(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtz(double2 x)
{
  double2 r = convert_double2(x);
  double2 y = convert_double2(r);
  double2 abs_x = fabs(x);
  double2 abs_y = fabs(y);
  double2 res = select(r, nextafter(r, sign(r) * (double2)-INFINITY), convert_long2(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rte(double2 x)
{
  return convert_double2(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtp(double2 x)
{
  double2 r = convert_double2(x);
  double2 y = convert_double2(r);
  double2 res = select(r, nextafter(r, (double2)INFINITY), convert_long2(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double2 convert_double2_rtn(double2 x)
{
  double2 r = convert_double2(x);
  double2 y = convert_double2(r);
  double2 res = select(r, nextafter(r, (double2)-INFINITY), convert_long2(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtz(double3 x)
{
  double3 r = convert_double3(x);
  double3 y = convert_double3(r);
  double3 abs_x = fabs(x);
  double3 abs_y = fabs(y);
  double3 res = select(r, nextafter(r, sign(r) * (double3)-INFINITY), convert_long3(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rte(double3 x)
{
  return convert_double3(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtp(double3 x)
{
  double3 r = convert_double3(x);
  double3 y = convert_double3(r);
  double3 res = select(r, nextafter(r, (double3)INFINITY), convert_long3(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double3 convert_double3_rtn(double3 x)
{
  double3 r = convert_double3(x);
  double3 y = convert_double3(r);
  double3 res = select(r, nextafter(r, (double3)-INFINITY), convert_long3(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtz(double4 x)
{
  double4 r = convert_double4(x);
  double4 y = convert_double4(r);
  double4 abs_x = fabs(x);
  double4 abs_y = fabs(y);
  double4 res = select(r, nextafter(r, sign(r) * (double4)-INFINITY), convert_long4(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rte(double4 x)
{
  return convert_double4(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtp(double4 x)
{
  double4 r = convert_double4(x);
  double4 y = convert_double4(r);
  double4 res = select(r, nextafter(r, (double4)INFINITY), convert_long4(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double4 convert_double4_rtn(double4 x)
{
  double4 r = convert_double4(x);
  double4 y = convert_double4(r);
  double4 res = select(r, nextafter(r, (double4)-INFINITY), convert_long4(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtz(double8 x)
{
  double8 r = convert_double8(x);
  double8 y = convert_double8(r);
  double8 abs_x = fabs(x);
  double8 abs_y = fabs(y);
  double8 res = select(r, nextafter(r, sign(r) * (double8)-INFINITY), convert_long8(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rte(double8 x)
{
  return convert_double8(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtp(double8 x)
{
  double8 r = convert_double8(x);
  double8 y = convert_double8(r);
  double8 res = select(r, nextafter(r, (double8)INFINITY), convert_long8(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double8 convert_double8_rtn(double8 x)
{
  double8 r = convert_double8(x);
  double8 y = convert_double8(r);
  double8 res = select(r, nextafter(r, (double8)-INFINITY), convert_long8(y > x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtz(double16 x)
{
  double16 r = convert_double16(x);
  double16 y = convert_double16(r);
  double16 abs_x = fabs(x);
  double16 abs_y = fabs(y);
  double16 res = select(r, nextafter(r, sign(r) * (double16)-INFINITY), convert_long16(abs_y > abs_x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rte(double16 x)
{
  return convert_double16(x);
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtp(double16 x)
{
  double16 r = convert_double16(x);
  double16 y = convert_double16(r);
  double16 res = select(r, nextafter(r, (double16)INFINITY), convert_long16(y < x));
  return res;
}
#endif

#if defined(cl_khr_fp64)
_CL_ALWAYSINLINE _CL_OVERLOADABLE _CL_READNONE
double16 convert_double16_rtn(double16 x)
{
  double16 r = convert_double16(x);
  double16 y = convert_double16(r);
  double16 res = select(r, nextafter(r, (double16)-INFINITY), convert_long16(y > x));
  return res;
}
#endif
