[Libclc-dev] [PATCH 2/3] integer/gentype: Add __CLC_VECSIZE macro

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Sat Mar 3 13:44:42 PST 2018


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generic/include/clc/integer/gentype.inc | 96 +++++++++++++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/generic/include/clc/integer/gentype.inc b/generic/include/clc/integer/gentype.inc
index 6f4d699..cefed9c 100644
--- a/generic/include/clc/integer/gentype.inc
+++ b/generic/include/clc/integer/gentype.inc
@@ -7,7 +7,9 @@
 #define __CLC_U_GENTYPE uchar
 #define __CLC_S_GENTYPE char
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -16,7 +18,9 @@
 #define __CLC_GENTYPE char2
 #define __CLC_U_GENTYPE uchar2
 #define __CLC_S_GENTYPE char2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -24,7 +28,9 @@
 #define __CLC_GENTYPE char3
 #define __CLC_U_GENTYPE uchar3
 #define __CLC_S_GENTYPE char3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -32,7 +38,9 @@
 #define __CLC_GENTYPE char4
 #define __CLC_U_GENTYPE uchar4
 #define __CLC_S_GENTYPE char4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -40,7 +48,9 @@
 #define __CLC_GENTYPE char8
 #define __CLC_U_GENTYPE uchar8
 #define __CLC_S_GENTYPE char8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -48,7 +58,9 @@
 #define __CLC_GENTYPE char16
 #define __CLC_U_GENTYPE uchar16
 #define __CLC_S_GENTYPE char16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -60,7 +72,9 @@
 #define __CLC_U_GENTYPE uchar
 #define __CLC_S_GENTYPE char
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -69,7 +83,9 @@
 #define __CLC_GENTYPE uchar2
 #define __CLC_U_GENTYPE uchar2
 #define __CLC_S_GENTYPE char2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -77,7 +93,9 @@
 #define __CLC_GENTYPE uchar3
 #define __CLC_U_GENTYPE uchar3
 #define __CLC_S_GENTYPE char3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -85,7 +103,9 @@
 #define __CLC_GENTYPE uchar4
 #define __CLC_U_GENTYPE uchar4
 #define __CLC_S_GENTYPE char4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -93,7 +113,9 @@
 #define __CLC_GENTYPE uchar8
 #define __CLC_U_GENTYPE uchar8
 #define __CLC_S_GENTYPE char8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -101,7 +123,9 @@
 #define __CLC_GENTYPE uchar16
 #define __CLC_U_GENTYPE uchar16
 #define __CLC_S_GENTYPE char16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -115,7 +139,9 @@
 #define __CLC_U_GENTYPE ushort
 #define __CLC_S_GENTYPE short
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -124,7 +150,9 @@
 #define __CLC_GENTYPE short2
 #define __CLC_U_GENTYPE ushort2
 #define __CLC_S_GENTYPE short2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -132,7 +160,9 @@
 #define __CLC_GENTYPE short3
 #define __CLC_U_GENTYPE ushort3
 #define __CLC_S_GENTYPE short3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -140,7 +170,9 @@
 #define __CLC_GENTYPE short4
 #define __CLC_U_GENTYPE ushort4
 #define __CLC_S_GENTYPE short4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -148,7 +180,9 @@
 #define __CLC_GENTYPE short8
 #define __CLC_U_GENTYPE ushort8
 #define __CLC_S_GENTYPE short8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -156,7 +190,9 @@
 #define __CLC_GENTYPE short16
 #define __CLC_U_GENTYPE ushort16
 #define __CLC_S_GENTYPE short16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -168,7 +204,9 @@
 #define __CLC_U_GENTYPE ushort
 #define __CLC_S_GENTYPE short
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -177,7 +215,9 @@
 #define __CLC_GENTYPE ushort2
 #define __CLC_U_GENTYPE ushort2
 #define __CLC_S_GENTYPE short2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -185,7 +225,9 @@
 #define __CLC_GENTYPE ushort3
 #define __CLC_U_GENTYPE ushort3
 #define __CLC_S_GENTYPE short3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -193,7 +235,9 @@
 #define __CLC_GENTYPE ushort4
 #define __CLC_U_GENTYPE ushort4
 #define __CLC_S_GENTYPE short4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -201,7 +245,9 @@
 #define __CLC_GENTYPE ushort8
 #define __CLC_U_GENTYPE ushort8
 #define __CLC_S_GENTYPE short8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -209,7 +255,9 @@
 #define __CLC_GENTYPE ushort16
 #define __CLC_U_GENTYPE ushort16
 #define __CLC_S_GENTYPE short16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -223,7 +271,9 @@
 #define __CLC_U_GENTYPE uint
 #define __CLC_S_GENTYPE int
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -232,7 +282,9 @@
 #define __CLC_GENTYPE int2
 #define __CLC_U_GENTYPE uint2
 #define __CLC_S_GENTYPE int2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -240,7 +292,9 @@
 #define __CLC_GENTYPE int3
 #define __CLC_U_GENTYPE uint3
 #define __CLC_S_GENTYPE int3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -248,7 +302,9 @@
 #define __CLC_GENTYPE int4
 #define __CLC_U_GENTYPE uint4
 #define __CLC_S_GENTYPE int4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -256,7 +312,9 @@
 #define __CLC_GENTYPE int8
 #define __CLC_U_GENTYPE uint8
 #define __CLC_S_GENTYPE int8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -264,7 +322,9 @@
 #define __CLC_GENTYPE int16
 #define __CLC_U_GENTYPE uint16
 #define __CLC_S_GENTYPE int16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -276,7 +336,9 @@
 #define __CLC_U_GENTYPE uint
 #define __CLC_S_GENTYPE int
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -285,7 +347,9 @@
 #define __CLC_GENTYPE uint2
 #define __CLC_U_GENTYPE uint2
 #define __CLC_S_GENTYPE int2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -293,7 +357,9 @@
 #define __CLC_GENTYPE uint3
 #define __CLC_U_GENTYPE uint3
 #define __CLC_S_GENTYPE int3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -301,7 +367,9 @@
 #define __CLC_GENTYPE uint4
 #define __CLC_U_GENTYPE uint4
 #define __CLC_S_GENTYPE int4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -309,7 +377,9 @@
 #define __CLC_GENTYPE uint8
 #define __CLC_U_GENTYPE uint8
 #define __CLC_S_GENTYPE int8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -317,7 +387,9 @@
 #define __CLC_GENTYPE uint16
 #define __CLC_U_GENTYPE uint16
 #define __CLC_S_GENTYPE int16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -331,7 +403,9 @@
 #define __CLC_U_GENTYPE ulong
 #define __CLC_S_GENTYPE long
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -340,7 +414,9 @@
 #define __CLC_GENTYPE long2
 #define __CLC_U_GENTYPE ulong2
 #define __CLC_S_GENTYPE long2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -348,7 +424,9 @@
 #define __CLC_GENTYPE long3
 #define __CLC_U_GENTYPE ulong3
 #define __CLC_S_GENTYPE long3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -356,7 +434,9 @@
 #define __CLC_GENTYPE long4
 #define __CLC_U_GENTYPE ulong4
 #define __CLC_S_GENTYPE long4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -364,7 +444,9 @@
 #define __CLC_GENTYPE long8
 #define __CLC_U_GENTYPE ulong8
 #define __CLC_S_GENTYPE long8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -372,7 +454,9 @@
 #define __CLC_GENTYPE long16
 #define __CLC_U_GENTYPE ulong16
 #define __CLC_S_GENTYPE long16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -384,7 +468,9 @@
 #define __CLC_U_GENTYPE ulong
 #define __CLC_S_GENTYPE long
 #define __CLC_SCALAR 1
+#define __CLC_VECSIZE
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_SCALAR
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
@@ -393,7 +479,9 @@
 #define __CLC_GENTYPE ulong2
 #define __CLC_U_GENTYPE ulong2
 #define __CLC_S_GENTYPE long2
+#define __CLC_VECSIZE 2
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -401,7 +489,9 @@
 #define __CLC_GENTYPE ulong3
 #define __CLC_U_GENTYPE ulong3
 #define __CLC_S_GENTYPE long3
+#define __CLC_VECSIZE 3
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -409,7 +499,9 @@
 #define __CLC_GENTYPE ulong4
 #define __CLC_U_GENTYPE ulong4
 #define __CLC_S_GENTYPE long4
+#define __CLC_VECSIZE 4
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -417,7 +509,9 @@
 #define __CLC_GENTYPE ulong8
 #define __CLC_U_GENTYPE ulong8
 #define __CLC_S_GENTYPE long8
+#define __CLC_VECSIZE 8
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
@@ -425,7 +519,9 @@
 #define __CLC_GENTYPE ulong16
 #define __CLC_U_GENTYPE ulong16
 #define __CLC_S_GENTYPE long16
+#define __CLC_VECSIZE 16
 #include __CLC_BODY
+#undef __CLC_VECSIZE
 #undef __CLC_GENTYPE
 #undef __CLC_U_GENTYPE
 #undef __CLC_S_GENTYPE
-- 
2.14.3



More information about the Libclc-dev mailing list