[Beignet] *** SPAM LEVEL 4.053 *** [PATCH 3/3] Enable generation of convert_ and as_ functions for double

Simon Richter Simon.Richter at hogyros.de
Wed Jun 19 03:17:58 PDT 2013


Signed-off-by: Simon Richter <Simon.Richter at hogyros.de>
---
 backend/src/genconfig.sh |    2 +-
 backend/src/ocl_stdlib.h |  774 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 775 insertions(+), 1 deletion(-)

diff --git a/backend/src/genconfig.sh b/backend/src/genconfig.sh
index a3ba3f9..65d1720 100644
--- a/backend/src/genconfig.sh
+++ b/backend/src/genconfig.sh
@@ -2,7 +2,7 @@
 # This is to be sourced by the generation scripts
 
 # Supported base types and their lengths
-TYPES="long:8 ulong:8 int:4 uint:4 short:2 ushort:2 char:1 uchar:1 float:4"
+TYPES="long:8 ulong:8 int:4 uint:4 short:2 ushort:2 char:1 uchar:1 double:8 float:4"
 
 # Supported vector lengths
 VECTOR_LENGTHS="1 2 3 4 8 16"
diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h
index e18d83c..81a0193 100644
--- a/backend/src/ocl_stdlib.h
+++ b/backend/src/ocl_stdlib.h
@@ -497,6 +497,7 @@ union _type_cast_8_b {
   ushort4 _ushort4;
   char8 _char8;
   uchar8 _uchar8;
+  double _double;
   float2 _float2;
 };
 
@@ -542,6 +543,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(long v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(long v) {
+  union _type_cast_8_b u;
+  u._long = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(long v) {
   union _type_cast_8_b u;
   u._long = v;
@@ -590,6 +597,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(ulong v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(ulong v) {
+  union _type_cast_8_b u;
+  u._ulong = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(ulong v) {
   union _type_cast_8_b u;
   u._ulong = v;
@@ -638,6 +651,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(int2 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(int2 v) {
+  union _type_cast_8_b u;
+  u._int2 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(int2 v) {
   union _type_cast_8_b u;
   u._int2 = v;
@@ -686,6 +705,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(uint2 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(uint2 v) {
+  union _type_cast_8_b u;
+  u._uint2 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(uint2 v) {
   union _type_cast_8_b u;
   u._uint2 = v;
@@ -734,6 +759,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(short4 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(short4 v) {
+  union _type_cast_8_b u;
+  u._short4 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(short4 v) {
   union _type_cast_8_b u;
   u._short4 = v;
@@ -782,6 +813,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(ushort4 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(ushort4 v) {
+  union _type_cast_8_b u;
+  u._ushort4 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(ushort4 v) {
   union _type_cast_8_b u;
   u._ushort4 = v;
@@ -830,6 +867,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(char8 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(char8 v) {
+  union _type_cast_8_b u;
+  u._char8 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(char8 v) {
   union _type_cast_8_b u;
   u._char8 = v;
@@ -878,12 +921,72 @@ INLINE OVERLOADABLE char8 as_char8(uchar8 v) {
   return u._char8;
 }
 
+INLINE OVERLOADABLE double as_double(uchar8 v) {
+  union _type_cast_8_b u;
+  u._uchar8 = v;
+  return u._double;
+}
+
 INLINE OVERLOADABLE float2 as_float2(uchar8 v) {
   union _type_cast_8_b u;
   u._uchar8 = v;
   return u._float2;
 }
 
+INLINE OVERLOADABLE long as_long(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._long;
+}
+
+INLINE OVERLOADABLE ulong as_ulong(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._ulong;
+}
+
+INLINE OVERLOADABLE int2 as_int2(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._int2;
+}
+
+INLINE OVERLOADABLE uint2 as_uint2(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._uint2;
+}
+
+INLINE OVERLOADABLE short4 as_short4(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._short4;
+}
+
+INLINE OVERLOADABLE ushort4 as_ushort4(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._ushort4;
+}
+
+INLINE OVERLOADABLE char8 as_char8(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._char8;
+}
+
+INLINE OVERLOADABLE uchar8 as_uchar8(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._uchar8;
+}
+
+INLINE OVERLOADABLE float2 as_float2(double v) {
+  union _type_cast_8_b u;
+  u._double = v;
+  return u._float2;
+}
+
 INLINE OVERLOADABLE long as_long(float2 v) {
   union _type_cast_8_b u;
   u._float2 = v;
@@ -932,6 +1035,12 @@ INLINE OVERLOADABLE uchar8 as_uchar8(float2 v) {
   return u._uchar8;
 }
 
+INLINE OVERLOADABLE double as_double(float2 v) {
+  union _type_cast_8_b u;
+  u._float2 = v;
+  return u._double;
+}
+
 union _type_cast_12_b {
   int3 _int3;
   uint3 _uint3;
@@ -983,6 +1092,7 @@ union _type_cast_16_b {
   ushort8 _ushort8;
   char16 _char16;
   uchar16 _uchar16;
+  double2 _double2;
   float4 _float4;
 };
 
@@ -1028,6 +1138,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(long2 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(long2 v) {
+  union _type_cast_16_b u;
+  u._long2 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(long2 v) {
   union _type_cast_16_b u;
   u._long2 = v;
@@ -1076,6 +1192,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(ulong2 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(ulong2 v) {
+  union _type_cast_16_b u;
+  u._ulong2 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(ulong2 v) {
   union _type_cast_16_b u;
   u._ulong2 = v;
@@ -1124,6 +1246,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(int4 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(int4 v) {
+  union _type_cast_16_b u;
+  u._int4 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(int4 v) {
   union _type_cast_16_b u;
   u._int4 = v;
@@ -1172,6 +1300,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(uint4 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(uint4 v) {
+  union _type_cast_16_b u;
+  u._uint4 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(uint4 v) {
   union _type_cast_16_b u;
   u._uint4 = v;
@@ -1220,6 +1354,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(short8 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(short8 v) {
+  union _type_cast_16_b u;
+  u._short8 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(short8 v) {
   union _type_cast_16_b u;
   u._short8 = v;
@@ -1268,6 +1408,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(ushort8 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(ushort8 v) {
+  union _type_cast_16_b u;
+  u._ushort8 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(ushort8 v) {
   union _type_cast_16_b u;
   u._ushort8 = v;
@@ -1316,6 +1462,12 @@ INLINE OVERLOADABLE uchar16 as_uchar16(char16 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(char16 v) {
+  union _type_cast_16_b u;
+  u._char16 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(char16 v) {
   union _type_cast_16_b u;
   u._char16 = v;
@@ -1364,12 +1516,72 @@ INLINE OVERLOADABLE char16 as_char16(uchar16 v) {
   return u._char16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(uchar16 v) {
+  union _type_cast_16_b u;
+  u._uchar16 = v;
+  return u._double2;
+}
+
 INLINE OVERLOADABLE float4 as_float4(uchar16 v) {
   union _type_cast_16_b u;
   u._uchar16 = v;
   return u._float4;
 }
 
+INLINE OVERLOADABLE long2 as_long2(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._long2;
+}
+
+INLINE OVERLOADABLE ulong2 as_ulong2(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._ulong2;
+}
+
+INLINE OVERLOADABLE int4 as_int4(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._int4;
+}
+
+INLINE OVERLOADABLE uint4 as_uint4(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._uint4;
+}
+
+INLINE OVERLOADABLE short8 as_short8(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._short8;
+}
+
+INLINE OVERLOADABLE ushort8 as_ushort8(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._ushort8;
+}
+
+INLINE OVERLOADABLE char16 as_char16(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._char16;
+}
+
+INLINE OVERLOADABLE uchar16 as_uchar16(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._uchar16;
+}
+
+INLINE OVERLOADABLE float4 as_float4(double2 v) {
+  union _type_cast_16_b u;
+  u._double2 = v;
+  return u._float4;
+}
+
 INLINE OVERLOADABLE long2 as_long2(float4 v) {
   union _type_cast_16_b u;
   u._float4 = v;
@@ -1418,9 +1630,16 @@ INLINE OVERLOADABLE uchar16 as_uchar16(float4 v) {
   return u._uchar16;
 }
 
+INLINE OVERLOADABLE double2 as_double2(float4 v) {
+  union _type_cast_16_b u;
+  u._float4 = v;
+  return u._double2;
+}
+
 union _type_cast_24_b {
   long3 _long3;
   ulong3 _ulong3;
+  double3 _double3;
 };
 
 INLINE OVERLOADABLE ulong3 as_ulong3(long3 v) {
@@ -1429,12 +1648,36 @@ INLINE OVERLOADABLE ulong3 as_ulong3(long3 v) {
   return u._ulong3;
 }
 
+INLINE OVERLOADABLE double3 as_double3(long3 v) {
+  union _type_cast_24_b u;
+  u._long3 = v;
+  return u._double3;
+}
+
 INLINE OVERLOADABLE long3 as_long3(ulong3 v) {
   union _type_cast_24_b u;
   u._ulong3 = v;
   return u._long3;
 }
 
+INLINE OVERLOADABLE double3 as_double3(ulong3 v) {
+  union _type_cast_24_b u;
+  u._ulong3 = v;
+  return u._double3;
+}
+
+INLINE OVERLOADABLE long3 as_long3(double3 v) {
+  union _type_cast_24_b u;
+  u._double3 = v;
+  return u._long3;
+}
+
+INLINE OVERLOADABLE ulong3 as_ulong3(double3 v) {
+  union _type_cast_24_b u;
+  u._double3 = v;
+  return u._ulong3;
+}
+
 union _type_cast_32_b {
   long4 _long4;
   ulong4 _ulong4;
@@ -1442,6 +1685,7 @@ union _type_cast_32_b {
   uint8 _uint8;
   short16 _short16;
   ushort16 _ushort16;
+  double4 _double4;
   float8 _float8;
 };
 
@@ -1475,6 +1719,12 @@ INLINE OVERLOADABLE ushort16 as_ushort16(long4 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(long4 v) {
+  union _type_cast_32_b u;
+  u._long4 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(long4 v) {
   union _type_cast_32_b u;
   u._long4 = v;
@@ -1511,6 +1761,12 @@ INLINE OVERLOADABLE ushort16 as_ushort16(ulong4 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(ulong4 v) {
+  union _type_cast_32_b u;
+  u._ulong4 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(ulong4 v) {
   union _type_cast_32_b u;
   u._ulong4 = v;
@@ -1547,6 +1803,12 @@ INLINE OVERLOADABLE ushort16 as_ushort16(int8 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(int8 v) {
+  union _type_cast_32_b u;
+  u._int8 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(int8 v) {
   union _type_cast_32_b u;
   u._int8 = v;
@@ -1583,6 +1845,12 @@ INLINE OVERLOADABLE ushort16 as_ushort16(uint8 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(uint8 v) {
+  union _type_cast_32_b u;
+  u._uint8 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(uint8 v) {
   union _type_cast_32_b u;
   u._uint8 = v;
@@ -1619,6 +1887,12 @@ INLINE OVERLOADABLE ushort16 as_ushort16(short16 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(short16 v) {
+  union _type_cast_32_b u;
+  u._short16 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(short16 v) {
   union _type_cast_32_b u;
   u._short16 = v;
@@ -1655,12 +1929,60 @@ INLINE OVERLOADABLE short16 as_short16(ushort16 v) {
   return u._short16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(ushort16 v) {
+  union _type_cast_32_b u;
+  u._ushort16 = v;
+  return u._double4;
+}
+
 INLINE OVERLOADABLE float8 as_float8(ushort16 v) {
   union _type_cast_32_b u;
   u._ushort16 = v;
   return u._float8;
 }
 
+INLINE OVERLOADABLE long4 as_long4(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._long4;
+}
+
+INLINE OVERLOADABLE ulong4 as_ulong4(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._ulong4;
+}
+
+INLINE OVERLOADABLE int8 as_int8(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._int8;
+}
+
+INLINE OVERLOADABLE uint8 as_uint8(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._uint8;
+}
+
+INLINE OVERLOADABLE short16 as_short16(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._short16;
+}
+
+INLINE OVERLOADABLE ushort16 as_ushort16(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._ushort16;
+}
+
+INLINE OVERLOADABLE float8 as_float8(double4 v) {
+  union _type_cast_32_b u;
+  u._double4 = v;
+  return u._float8;
+}
+
 INLINE OVERLOADABLE long4 as_long4(float8 v) {
   union _type_cast_32_b u;
   u._float8 = v;
@@ -1697,11 +2019,18 @@ INLINE OVERLOADABLE ushort16 as_ushort16(float8 v) {
   return u._ushort16;
 }
 
+INLINE OVERLOADABLE double4 as_double4(float8 v) {
+  union _type_cast_32_b u;
+  u._float8 = v;
+  return u._double4;
+}
+
 union _type_cast_64_b {
   long8 _long8;
   ulong8 _ulong8;
   int16 _int16;
   uint16 _uint16;
+  double8 _double8;
   float16 _float16;
 };
 
@@ -1723,6 +2052,12 @@ INLINE OVERLOADABLE uint16 as_uint16(long8 v) {
   return u._uint16;
 }
 
+INLINE OVERLOADABLE double8 as_double8(long8 v) {
+  union _type_cast_64_b u;
+  u._long8 = v;
+  return u._double8;
+}
+
 INLINE OVERLOADABLE float16 as_float16(long8 v) {
   union _type_cast_64_b u;
   u._long8 = v;
@@ -1747,6 +2082,12 @@ INLINE OVERLOADABLE uint16 as_uint16(ulong8 v) {
   return u._uint16;
 }
 
+INLINE OVERLOADABLE double8 as_double8(ulong8 v) {
+  union _type_cast_64_b u;
+  u._ulong8 = v;
+  return u._double8;
+}
+
 INLINE OVERLOADABLE float16 as_float16(ulong8 v) {
   union _type_cast_64_b u;
   u._ulong8 = v;
@@ -1771,6 +2112,12 @@ INLINE OVERLOADABLE uint16 as_uint16(int16 v) {
   return u._uint16;
 }
 
+INLINE OVERLOADABLE double8 as_double8(int16 v) {
+  union _type_cast_64_b u;
+  u._int16 = v;
+  return u._double8;
+}
+
 INLINE OVERLOADABLE float16 as_float16(int16 v) {
   union _type_cast_64_b u;
   u._int16 = v;
@@ -1795,12 +2142,48 @@ INLINE OVERLOADABLE int16 as_int16(uint16 v) {
   return u._int16;
 }
 
+INLINE OVERLOADABLE double8 as_double8(uint16 v) {
+  union _type_cast_64_b u;
+  u._uint16 = v;
+  return u._double8;
+}
+
 INLINE OVERLOADABLE float16 as_float16(uint16 v) {
   union _type_cast_64_b u;
   u._uint16 = v;
   return u._float16;
 }
 
+INLINE OVERLOADABLE long8 as_long8(double8 v) {
+  union _type_cast_64_b u;
+  u._double8 = v;
+  return u._long8;
+}
+
+INLINE OVERLOADABLE ulong8 as_ulong8(double8 v) {
+  union _type_cast_64_b u;
+  u._double8 = v;
+  return u._ulong8;
+}
+
+INLINE OVERLOADABLE int16 as_int16(double8 v) {
+  union _type_cast_64_b u;
+  u._double8 = v;
+  return u._int16;
+}
+
+INLINE OVERLOADABLE uint16 as_uint16(double8 v) {
+  union _type_cast_64_b u;
+  u._double8 = v;
+  return u._uint16;
+}
+
+INLINE OVERLOADABLE float16 as_float16(double8 v) {
+  union _type_cast_64_b u;
+  u._double8 = v;
+  return u._float16;
+}
+
 INLINE OVERLOADABLE long8 as_long8(float16 v) {
   union _type_cast_64_b u;
   u._float16 = v;
@@ -1825,9 +2208,16 @@ INLINE OVERLOADABLE uint16 as_uint16(float16 v) {
   return u._uint16;
 }
 
+INLINE OVERLOADABLE double8 as_double8(float16 v) {
+  union _type_cast_64_b u;
+  u._float16 = v;
+  return u._double8;
+}
+
 union _type_cast_128_b {
   long16 _long16;
   ulong16 _ulong16;
+  double16 _double16;
 };
 
 INLINE OVERLOADABLE ulong16 as_ulong16(long16 v) {
@@ -1836,12 +2226,36 @@ INLINE OVERLOADABLE ulong16 as_ulong16(long16 v) {
   return u._ulong16;
 }
 
+INLINE OVERLOADABLE double16 as_double16(long16 v) {
+  union _type_cast_128_b u;
+  u._long16 = v;
+  return u._double16;
+}
+
 INLINE OVERLOADABLE long16 as_long16(ulong16 v) {
   union _type_cast_128_b u;
   u._ulong16 = v;
   return u._long16;
 }
 
+INLINE OVERLOADABLE double16 as_double16(ulong16 v) {
+  union _type_cast_128_b u;
+  u._ulong16 = v;
+  return u._double16;
+}
+
+INLINE OVERLOADABLE long16 as_long16(double16 v) {
+  union _type_cast_128_b u;
+  u._double16 = v;
+  return u._long16;
+}
+
+INLINE OVERLOADABLE ulong16 as_ulong16(double16 v) {
+  union _type_cast_128_b u;
+  u._double16 = v;
+  return u._ulong16;
+}
+
 // ##END_AS##
 
 // ##BEGIN_CONVERT##
@@ -1873,6 +2287,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(long2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(long2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(long2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -1905,6 +2323,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(ulong2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(ulong2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(ulong2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -1937,6 +2359,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(int2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(int2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(int2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -1969,6 +2395,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(uint2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(uint2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(uint2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -2001,6 +2431,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(short2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(short2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(short2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -2033,6 +2467,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(ushort2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(ushort2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(ushort2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -2065,6 +2503,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(char2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(char2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(char2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
@@ -2097,10 +2539,50 @@ INLINE OVERLOADABLE char2 convert_char2(uchar2 v) {
   return (char2)((char)(v.s0), (char)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(uchar2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE float2 convert_float2(uchar2 v) {
   return (float2)((float)(v.s0), (float)(v.s1));
 }
 
+INLINE OVERLOADABLE long2 convert_long2(double2 v) {
+  return (long2)((long)(v.s0), (long)(v.s1));
+}
+
+INLINE OVERLOADABLE ulong2 convert_ulong2(double2 v) {
+  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
+}
+
+INLINE OVERLOADABLE int2 convert_int2(double2 v) {
+  return (int2)((int)(v.s0), (int)(v.s1));
+}
+
+INLINE OVERLOADABLE uint2 convert_uint2(double2 v) {
+  return (uint2)((uint)(v.s0), (uint)(v.s1));
+}
+
+INLINE OVERLOADABLE short2 convert_short2(double2 v) {
+  return (short2)((short)(v.s0), (short)(v.s1));
+}
+
+INLINE OVERLOADABLE ushort2 convert_ushort2(double2 v) {
+  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
+}
+
+INLINE OVERLOADABLE char2 convert_char2(double2 v) {
+  return (char2)((char)(v.s0), (char)(v.s1));
+}
+
+INLINE OVERLOADABLE uchar2 convert_uchar2(double2 v) {
+  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
+}
+
+INLINE OVERLOADABLE float2 convert_float2(double2 v) {
+  return (float2)((float)(v.s0), (float)(v.s1));
+}
+
 INLINE OVERLOADABLE long2 convert_long2(float2 v) {
   return (long2)((long)(v.s0), (long)(v.s1));
 }
@@ -2133,6 +2615,10 @@ INLINE OVERLOADABLE uchar2 convert_uchar2(float2 v) {
   return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 }
 
+INLINE OVERLOADABLE double2 convert_double2(float2 v) {
+  return (double2)((double)(v.s0), (double)(v.s1));
+}
+
 INLINE OVERLOADABLE ulong3 convert_ulong3(long3 v) {
   return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 }
@@ -2161,6 +2647,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(long3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(long3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(long3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2193,6 +2683,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(ulong3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(ulong3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(ulong3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2225,6 +2719,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(int3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(int3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(int3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2257,6 +2755,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(uint3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(uint3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(uint3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2289,6 +2791,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(short3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(short3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(short3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2321,6 +2827,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(ushort3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(ushort3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(ushort3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2353,6 +2863,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(char3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(char3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(char3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
@@ -2385,10 +2899,50 @@ INLINE OVERLOADABLE char3 convert_char3(uchar3 v) {
   return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(uchar3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE float3 convert_float3(uchar3 v) {
   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 }
 
+INLINE OVERLOADABLE long3 convert_long3(double3 v) {
+  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
+}
+
+INLINE OVERLOADABLE ulong3 convert_ulong3(double3 v) {
+  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
+}
+
+INLINE OVERLOADABLE int3 convert_int3(double3 v) {
+  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
+}
+
+INLINE OVERLOADABLE uint3 convert_uint3(double3 v) {
+  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
+}
+
+INLINE OVERLOADABLE short3 convert_short3(double3 v) {
+  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
+}
+
+INLINE OVERLOADABLE ushort3 convert_ushort3(double3 v) {
+  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
+}
+
+INLINE OVERLOADABLE char3 convert_char3(double3 v) {
+  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
+}
+
+INLINE OVERLOADABLE uchar3 convert_uchar3(double3 v) {
+  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
+}
+
+INLINE OVERLOADABLE float3 convert_float3(double3 v) {
+  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
+}
+
 INLINE OVERLOADABLE long3 convert_long3(float3 v) {
   return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 }
@@ -2421,6 +2975,10 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(float3 v) {
   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 }
 
+INLINE OVERLOADABLE double3 convert_double3(float3 v) {
+  return (double3)((double)(v.s0), (double)(v.s1), (double)(v.s2));
+}
+
 INLINE OVERLOADABLE ulong4 convert_ulong4(long4 v) {
   return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 }
@@ -2449,6 +3007,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(long4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(long4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(long4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2481,6 +3043,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(ulong4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(ulong4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(ulong4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2513,6 +3079,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(int4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(int4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(int4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2545,6 +3115,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(uint4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(uint4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(uint4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2577,6 +3151,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(short4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(short4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(short4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2609,6 +3187,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(ushort4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(ushort4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(ushort4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2641,6 +3223,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(char4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(char4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(char4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
@@ -2673,10 +3259,50 @@ INLINE OVERLOADABLE char4 convert_char4(uchar4 v) {
   return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(uchar4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE float4 convert_float4(uchar4 v) {
   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 }
 
+INLINE OVERLOADABLE long4 convert_long4(double4 v) {
+  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
+}
+
+INLINE OVERLOADABLE ulong4 convert_ulong4(double4 v) {
+  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
+}
+
+INLINE OVERLOADABLE int4 convert_int4(double4 v) {
+  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
+}
+
+INLINE OVERLOADABLE uint4 convert_uint4(double4 v) {
+  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
+}
+
+INLINE OVERLOADABLE short4 convert_short4(double4 v) {
+  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
+}
+
+INLINE OVERLOADABLE ushort4 convert_ushort4(double4 v) {
+  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
+}
+
+INLINE OVERLOADABLE char4 convert_char4(double4 v) {
+  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
+}
+
+INLINE OVERLOADABLE uchar4 convert_uchar4(double4 v) {
+  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
+}
+
+INLINE OVERLOADABLE float4 convert_float4(double4 v) {
+  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
+}
+
 INLINE OVERLOADABLE long4 convert_long4(float4 v) {
   return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 }
@@ -2709,6 +3335,10 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(float4 v) {
   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 }
 
+INLINE OVERLOADABLE double4 convert_double4(float4 v) {
+  return (double4)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3));
+}
+
 INLINE OVERLOADABLE ulong8 convert_ulong8(long8 v) {
   return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 }
@@ -2737,6 +3367,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(long8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(long8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(long8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2769,6 +3403,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(ulong8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(ulong8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(ulong8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2801,6 +3439,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(int8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(int8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(int8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2833,6 +3475,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(uint8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(uint8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(uint8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2865,6 +3511,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(short8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(short8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(short8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2897,6 +3547,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(ushort8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(ushort8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(ushort8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2929,6 +3583,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(char8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(char8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(char8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
@@ -2961,10 +3619,50 @@ INLINE OVERLOADABLE char8 convert_char8(uchar8 v) {
   return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(uchar8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE float8 convert_float8(uchar8 v) {
   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 }
 
+INLINE OVERLOADABLE long8 convert_long8(double8 v) {
+  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
+}
+
+INLINE OVERLOADABLE ulong8 convert_ulong8(double8 v) {
+  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
+}
+
+INLINE OVERLOADABLE int8 convert_int8(double8 v) {
+  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
+}
+
+INLINE OVERLOADABLE uint8 convert_uint8(double8 v) {
+  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
+}
+
+INLINE OVERLOADABLE short8 convert_short8(double8 v) {
+  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
+}
+
+INLINE OVERLOADABLE ushort8 convert_ushort8(double8 v) {
+  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
+}
+
+INLINE OVERLOADABLE char8 convert_char8(double8 v) {
+  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
+}
+
+INLINE OVERLOADABLE uchar8 convert_uchar8(double8 v) {
+  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
+}
+
+INLINE OVERLOADABLE float8 convert_float8(double8 v) {
+  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
+}
+
 INLINE OVERLOADABLE long8 convert_long8(float8 v) {
   return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 }
@@ -2997,6 +3695,10 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(float8 v) {
   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 }
 
+INLINE OVERLOADABLE double8 convert_double8(float8 v) {
+  return (double8)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7));
+}
+
 INLINE OVERLOADABLE ulong16 convert_ulong16(long16 v) {
   return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 }
@@ -3025,6 +3727,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(long16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(long16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(long16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3057,6 +3763,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(ulong16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(ulong16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(ulong16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3089,6 +3799,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(int16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(int16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(int16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3121,6 +3835,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(uint16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(uint16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(uint16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3153,6 +3871,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(short16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(short16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(short16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3185,6 +3907,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(ushort16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(ushort16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(ushort16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3217,6 +3943,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(char16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(char16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(char16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
@@ -3249,10 +3979,50 @@ INLINE OVERLOADABLE char16 convert_char16(uchar16 v) {
   return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(uchar16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 INLINE OVERLOADABLE float16 convert_float16(uchar16 v) {
   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 }
 
+INLINE OVERLOADABLE long16 convert_long16(double16 v) {
+  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
+}
+
+INLINE OVERLOADABLE ulong16 convert_ulong16(double16 v) {
+  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
+}
+
+INLINE OVERLOADABLE int16 convert_int16(double16 v) {
+  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
+}
+
+INLINE OVERLOADABLE uint16 convert_uint16(double16 v) {
+  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
+}
+
+INLINE OVERLOADABLE short16 convert_short16(double16 v) {
+  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
+}
+
+INLINE OVERLOADABLE ushort16 convert_ushort16(double16 v) {
+  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
+}
+
+INLINE OVERLOADABLE char16 convert_char16(double16 v) {
+  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
+}
+
+INLINE OVERLOADABLE uchar16 convert_uchar16(double16 v) {
+  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
+}
+
+INLINE OVERLOADABLE float16 convert_float16(double16 v) {
+  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
+}
+
 INLINE OVERLOADABLE long16 convert_long16(float16 v) {
   return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 }
@@ -3285,6 +4055,10 @@ INLINE OVERLOADABLE uchar16 convert_uchar16(float16 v) {
   return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 }
 
+INLINE OVERLOADABLE double16 convert_double16(float16 v) {
+  return (double16)((double)(v.s0), (double)(v.s1), (double)(v.s2), (double)(v.s3), (double)(v.s4), (double)(v.s5), (double)(v.s6), (double)(v.s7), (double)(v.s8), (double)(v.s9), (double)(v.sA), (double)(v.sB), (double)(v.sC), (double)(v.sD), (double)(v.sE), (double)(v.sF));
+}
+
 // ##END_CONVERT##
 
 /////////////////////////////////////////////////////////////////////////////
-- 
1.7.10.4



More information about the Beignet mailing list