diff options
Diffstat (limited to 'generic/include')
50 files changed, 644 insertions, 644 deletions
diff --git a/generic/include/clc/gentype.inc b/generic/include/clc/gentype.inc index 4506920..1ff064a 100644 --- a/generic/include/clc/gentype.inc +++ b/generic/include/clc/gentype.inc @@ -1,51 +1,51 @@ -#define GENTYPE float +#define __CLC_GENTYPE float #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE float2 +#define __CLC_GENTYPE float2 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE float3 +#define __CLC_GENTYPE float3 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE float4 +#define __CLC_GENTYPE float4 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE float8 +#define __CLC_GENTYPE float8 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE float16 +#define __CLC_GENTYPE float16 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE #ifdef cl_khr_fp64 -#define GENTYPE double +#define __CLC_GENTYPE double #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE double2 +#define __CLC_GENTYPE double2 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE double3 +#define __CLC_GENTYPE double3 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE double4 +#define __CLC_GENTYPE double4 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE double8 +#define __CLC_GENTYPE double8 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE -#define GENTYPE double16 +#define __CLC_GENTYPE double16 #include BODY -#undef GENTYPE +#undef __CLC_GENTYPE #endif #undef BODY diff --git a/generic/include/clc/geometric/distance.h b/generic/include/clc/geometric/distance.h index 1660dcd..3e91332 100644 --- a/generic/include/clc/geometric/distance.h +++ b/generic/include/clc/geometric/distance.h @@ -1,2 +1,2 @@ -#define BODY <clc/geometric/distance.inc> +#define __CLC_BODY <clc/geometric/distance.inc> #include <clc/geometric/floatn.inc> diff --git a/generic/include/clc/geometric/dot.h b/generic/include/clc/geometric/dot.h index 5f0464f..7f65fed 100644 --- a/generic/include/clc/geometric/dot.h +++ b/generic/include/clc/geometric/dot.h @@ -1,2 +1,2 @@ -#define BODY <clc/geometric/dot.inc> +#define __CLC_BODY <clc/geometric/dot.inc> #include <clc/geometric/floatn.inc> diff --git a/generic/include/clc/geometric/dot.inc b/generic/include/clc/geometric/dot.inc index 69c53a9..34245e2 100644 --- a/generic/include/clc/geometric/dot.inc +++ b/generic/include/clc/geometric/dot.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL FLOAT dot(FLOATN p0, FLOATN p1); +_CLC_OVERLOAD _CLC_DECL __CLC_FLOAT dot(__CLC_FLOATN p0, __CLC_FLOATN p1); diff --git a/generic/include/clc/geometric/floatn.inc b/generic/include/clc/geometric/floatn.inc index e84545a..fb7a9ae 100644 --- a/generic/include/clc/geometric/floatn.inc +++ b/generic/include/clc/geometric/floatn.inc @@ -1,45 +1,45 @@ -#define FLOAT float +#define __CLC_FLOAT float -#define FLOATN float -#include BODY -#undef FLOATN +#define __CLC_FLOATN float +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN float2 -#include BODY -#undef FLOATN +#define __CLC_FLOATN float2 +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN float3 -#include BODY -#undef FLOATN +#define __CLC_FLOATN float3 +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN float4 -#include BODY -#undef FLOATN +#define __CLC_FLOATN float4 +#include __CLC_BODY +#undef __CLC_FLOATN -#undef FLOAT +#undef __CLC_FLOAT #ifdef cl_khr_fp64 -#define FLOAT double +#define __CLC_FLOAT double -#define FLOATN double -#include BODY -#undef FLOATN +#define __CLC_FLOATN double +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN double2 -#include BODY -#undef FLOATN +#define __CLC_FLOATN double2 +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN double3 -#include BODY -#undef FLOATN +#define __CLC_FLOATN double3 +#include __CLC_BODY +#undef __CLC_FLOATN -#define FLOATN double4 -#include BODY -#undef FLOATN +#define __CLC_FLOATN double4 +#include __CLC_BODY +#undef __CLC_FLOATN -#undef FLOAT +#undef __CLC_FLOAT #endif -#undef BODY +#undef __CLC_BODY diff --git a/generic/include/clc/geometric/length.h b/generic/include/clc/geometric/length.h index fbba634..cb992b9 100644 --- a/generic/include/clc/geometric/length.h +++ b/generic/include/clc/geometric/length.h @@ -1,2 +1,2 @@ -#define BODY <clc/geometric/length.inc> +#define __CLC_BODY <clc/geometric/length.inc> #include <clc/geometric/floatn.inc> diff --git a/generic/include/clc/geometric/length.inc b/generic/include/clc/geometric/length.inc index a9fa2d5..c2d95e8 100644 --- a/generic/include/clc/geometric/length.inc +++ b/generic/include/clc/geometric/length.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL FLOAT length(FLOATN p0); +_CLC_OVERLOAD _CLC_DECL __CLC_FLOAT length(__CLC_FLOATN p0); diff --git a/generic/include/clc/geometric/normalize.h b/generic/include/clc/geometric/normalize.h index 3aaf61c..dccff9b 100644 --- a/generic/include/clc/geometric/normalize.h +++ b/generic/include/clc/geometric/normalize.h @@ -1,2 +1,2 @@ -#define BODY <clc/geometric/normalize.inc> +#define __CLC_BODY <clc/geometric/normalize.inc> #include <clc/geometric/floatn.inc> diff --git a/generic/include/clc/geometric/normalize.inc b/generic/include/clc/geometric/normalize.inc index 7b4f69d..6eb1315 100644 --- a/generic/include/clc/geometric/normalize.inc +++ b/generic/include/clc/geometric/normalize.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL FLOATN normalize(FLOATN p); +_CLC_OVERLOAD _CLC_DECL __CLC_FLOATN normalize(__CLC_FLOATN p); diff --git a/generic/include/clc/integer/abs.h b/generic/include/clc/integer/abs.h index 7592e4b..77a4cbe 100644 --- a/generic/include/clc/integer/abs.h +++ b/generic/include/clc/integer/abs.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/abs.inc> +#define __CLC_BODY <clc/integer/abs.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/abs.inc b/generic/include/clc/integer/abs.inc index bfbec20..952bce7 100644 --- a/generic/include/clc/integer/abs.inc +++ b/generic/include/clc/integer/abs.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL UGENTYPE abs(GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_U_GENTYPE abs(__CLC_GENTYPE x); diff --git a/generic/include/clc/integer/abs_diff.h b/generic/include/clc/integer/abs_diff.h index 16fb465..3f3b4b4 100644 --- a/generic/include/clc/integer/abs_diff.h +++ b/generic/include/clc/integer/abs_diff.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/abs_diff.inc> +#define __CLC_BODY <clc/integer/abs_diff.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/abs_diff.inc b/generic/include/clc/integer/abs_diff.inc index 8cfdb9b..e844d46 100644 --- a/generic/include/clc/integer/abs_diff.inc +++ b/generic/include/clc/integer/abs_diff.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL UGENTYPE abs_diff(GENTYPE x, GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/generic/include/clc/integer/add_sat.h b/generic/include/clc/integer/add_sat.h index 9dbe12a..2e5e698 100644 --- a/generic/include/clc/integer/add_sat.h +++ b/generic/include/clc/integer/add_sat.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/add_sat.inc> +#define __CLC_BODY <clc/integer/add_sat.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/add_sat.inc b/generic/include/clc/integer/add_sat.inc index 2ea8a83..913841a 100644 --- a/generic/include/clc/integer/add_sat.inc +++ b/generic/include/clc/integer/add_sat.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE add_sat(GENTYPE x, GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE add_sat(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/generic/include/clc/integer/clz.h b/generic/include/clc/integer/clz.h index 5708eb4..f7cdbf7 100644 --- a/generic/include/clc/integer/clz.h +++ b/generic/include/clc/integer/clz.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/clz.inc> +#define __CLC_BODY <clc/integer/clz.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/clz.inc b/generic/include/clc/integer/clz.inc index ac73a31..45826d1 100644 --- a/generic/include/clc/integer/clz.inc +++ b/generic/include/clc/integer/clz.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE clz(GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clz(__CLC_GENTYPE x); diff --git a/generic/include/clc/integer/gentype.inc b/generic/include/clc/integer/gentype.inc index 95a37d5..6f4d699 100644 --- a/generic/include/clc/integer/gentype.inc +++ b/generic/include/clc/integer/gentype.inc @@ -1,435 +1,435 @@ //These 2 defines only change when switching between data sizes or base types to //keep this file manageable. -#define GENSIZE 8 -#define SCALAR_GENTYPE char - -#define GENTYPE char -#define UGENTYPE uchar -#define SGENTYPE char -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE char2 -#define UGENTYPE uchar2 -#define SGENTYPE char2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE char3 -#define UGENTYPE uchar3 -#define SGENTYPE char3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE char4 -#define UGENTYPE uchar4 -#define SGENTYPE char4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE char8 -#define UGENTYPE uchar8 -#define SGENTYPE char8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE char16 -#define UGENTYPE uchar16 -#define SGENTYPE char16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE uchar - -#define GENTYPE uchar -#define UGENTYPE uchar -#define SGENTYPE char -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uchar2 -#define UGENTYPE uchar2 -#define SGENTYPE char2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uchar3 -#define UGENTYPE uchar3 -#define SGENTYPE char3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uchar4 -#define UGENTYPE uchar4 -#define SGENTYPE char4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uchar8 -#define UGENTYPE uchar8 -#define SGENTYPE char8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uchar16 -#define UGENTYPE uchar16 -#define SGENTYPE char16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef GENSIZE -#define GENSIZE 16 -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE short - -#define GENTYPE short -#define UGENTYPE ushort -#define SGENTYPE short -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE short2 -#define UGENTYPE ushort2 -#define SGENTYPE short2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE short3 -#define UGENTYPE ushort3 -#define SGENTYPE short3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE short4 -#define UGENTYPE ushort4 -#define SGENTYPE short4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE short8 -#define UGENTYPE ushort8 -#define SGENTYPE short8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE short16 -#define UGENTYPE ushort16 -#define SGENTYPE short16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE ushort - -#define GENTYPE ushort -#define UGENTYPE ushort -#define SGENTYPE short -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ushort2 -#define UGENTYPE ushort2 -#define SGENTYPE short2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ushort3 -#define UGENTYPE ushort3 -#define SGENTYPE short3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ushort4 -#define UGENTYPE ushort4 -#define SGENTYPE short4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ushort8 -#define UGENTYPE ushort8 -#define SGENTYPE short8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ushort16 -#define UGENTYPE ushort16 -#define SGENTYPE short16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef GENSIZE -#define GENSIZE 32 -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE int - -#define GENTYPE int -#define UGENTYPE uint -#define SGENTYPE int -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE int2 -#define UGENTYPE uint2 -#define SGENTYPE int2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE int3 -#define UGENTYPE uint3 -#define SGENTYPE int3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE int4 -#define UGENTYPE uint4 -#define SGENTYPE int4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE int8 -#define UGENTYPE uint8 -#define SGENTYPE int8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE int16 -#define UGENTYPE uint16 -#define SGENTYPE int16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE uint - -#define GENTYPE uint -#define UGENTYPE uint -#define SGENTYPE int -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uint2 -#define UGENTYPE uint2 -#define SGENTYPE int2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uint3 -#define UGENTYPE uint3 -#define SGENTYPE int3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uint4 -#define UGENTYPE uint4 -#define SGENTYPE int4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uint8 -#define UGENTYPE uint8 -#define SGENTYPE int8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE uint16 -#define UGENTYPE uint16 -#define SGENTYPE int16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef GENSIZE -#define GENSIZE 64 -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE long - -#define GENTYPE long -#define UGENTYPE ulong -#define SGENTYPE long -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE long2 -#define UGENTYPE ulong2 -#define SGENTYPE long2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE long3 -#define UGENTYPE ulong3 -#define SGENTYPE long3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE long4 -#define UGENTYPE ulong4 -#define SGENTYPE long4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE long8 -#define UGENTYPE ulong8 -#define SGENTYPE long8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE long16 -#define UGENTYPE ulong16 -#define SGENTYPE long16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef SCALAR_GENTYPE -#define SCALAR_GENTYPE ulong - -#define GENTYPE ulong -#define UGENTYPE ulong -#define SGENTYPE long -#define SCALAR 1 -#include BODY -#undef SCALAR -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ulong2 -#define UGENTYPE ulong2 -#define SGENTYPE long2 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ulong3 -#define UGENTYPE ulong3 -#define SGENTYPE long3 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ulong4 -#define UGENTYPE ulong4 -#define SGENTYPE long4 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ulong8 -#define UGENTYPE ulong8 -#define SGENTYPE long8 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#define GENTYPE ulong16 -#define UGENTYPE ulong16 -#define SGENTYPE long16 -#include BODY -#undef GENTYPE -#undef UGENTYPE -#undef SGENTYPE - -#undef GENSIZE -#undef SCALAR_GENTYPE -#undef BODY +#define __CLC_GENSIZE 8 +#define __CLC_SCALAR_GENTYPE char + +#define __CLC_GENTYPE char +#define __CLC_U_GENTYPE uchar +#define __CLC_S_GENTYPE char +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE char2 +#define __CLC_U_GENTYPE uchar2 +#define __CLC_S_GENTYPE char2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE char3 +#define __CLC_U_GENTYPE uchar3 +#define __CLC_S_GENTYPE char3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE char4 +#define __CLC_U_GENTYPE uchar4 +#define __CLC_S_GENTYPE char4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE char8 +#define __CLC_U_GENTYPE uchar8 +#define __CLC_S_GENTYPE char8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE char16 +#define __CLC_U_GENTYPE uchar16 +#define __CLC_S_GENTYPE char16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE uchar + +#define __CLC_GENTYPE uchar +#define __CLC_U_GENTYPE uchar +#define __CLC_S_GENTYPE char +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uchar2 +#define __CLC_U_GENTYPE uchar2 +#define __CLC_S_GENTYPE char2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uchar3 +#define __CLC_U_GENTYPE uchar3 +#define __CLC_S_GENTYPE char3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uchar4 +#define __CLC_U_GENTYPE uchar4 +#define __CLC_S_GENTYPE char4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uchar8 +#define __CLC_U_GENTYPE uchar8 +#define __CLC_S_GENTYPE char8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uchar16 +#define __CLC_U_GENTYPE uchar16 +#define __CLC_S_GENTYPE char16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_GENSIZE +#define __CLC_GENSIZE 16 +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE short + +#define __CLC_GENTYPE short +#define __CLC_U_GENTYPE ushort +#define __CLC_S_GENTYPE short +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE short2 +#define __CLC_U_GENTYPE ushort2 +#define __CLC_S_GENTYPE short2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE short3 +#define __CLC_U_GENTYPE ushort3 +#define __CLC_S_GENTYPE short3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE short4 +#define __CLC_U_GENTYPE ushort4 +#define __CLC_S_GENTYPE short4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE short8 +#define __CLC_U_GENTYPE ushort8 +#define __CLC_S_GENTYPE short8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE short16 +#define __CLC_U_GENTYPE ushort16 +#define __CLC_S_GENTYPE short16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE ushort + +#define __CLC_GENTYPE ushort +#define __CLC_U_GENTYPE ushort +#define __CLC_S_GENTYPE short +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ushort2 +#define __CLC_U_GENTYPE ushort2 +#define __CLC_S_GENTYPE short2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ushort3 +#define __CLC_U_GENTYPE ushort3 +#define __CLC_S_GENTYPE short3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ushort4 +#define __CLC_U_GENTYPE ushort4 +#define __CLC_S_GENTYPE short4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ushort8 +#define __CLC_U_GENTYPE ushort8 +#define __CLC_S_GENTYPE short8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ushort16 +#define __CLC_U_GENTYPE ushort16 +#define __CLC_S_GENTYPE short16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_GENSIZE +#define __CLC_GENSIZE 32 +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE int + +#define __CLC_GENTYPE int +#define __CLC_U_GENTYPE uint +#define __CLC_S_GENTYPE int +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE int2 +#define __CLC_U_GENTYPE uint2 +#define __CLC_S_GENTYPE int2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE int3 +#define __CLC_U_GENTYPE uint3 +#define __CLC_S_GENTYPE int3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE int4 +#define __CLC_U_GENTYPE uint4 +#define __CLC_S_GENTYPE int4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE int8 +#define __CLC_U_GENTYPE uint8 +#define __CLC_S_GENTYPE int8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE int16 +#define __CLC_U_GENTYPE uint16 +#define __CLC_S_GENTYPE int16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE uint + +#define __CLC_GENTYPE uint +#define __CLC_U_GENTYPE uint +#define __CLC_S_GENTYPE int +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uint2 +#define __CLC_U_GENTYPE uint2 +#define __CLC_S_GENTYPE int2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uint3 +#define __CLC_U_GENTYPE uint3 +#define __CLC_S_GENTYPE int3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uint4 +#define __CLC_U_GENTYPE uint4 +#define __CLC_S_GENTYPE int4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uint8 +#define __CLC_U_GENTYPE uint8 +#define __CLC_S_GENTYPE int8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE uint16 +#define __CLC_U_GENTYPE uint16 +#define __CLC_S_GENTYPE int16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_GENSIZE +#define __CLC_GENSIZE 64 +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE long + +#define __CLC_GENTYPE long +#define __CLC_U_GENTYPE ulong +#define __CLC_S_GENTYPE long +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE long2 +#define __CLC_U_GENTYPE ulong2 +#define __CLC_S_GENTYPE long2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE long3 +#define __CLC_U_GENTYPE ulong3 +#define __CLC_S_GENTYPE long3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE long4 +#define __CLC_U_GENTYPE ulong4 +#define __CLC_S_GENTYPE long4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE long8 +#define __CLC_U_GENTYPE ulong8 +#define __CLC_S_GENTYPE long8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE long16 +#define __CLC_U_GENTYPE ulong16 +#define __CLC_S_GENTYPE long16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_SCALAR_GENTYPE +#define __CLC_SCALAR_GENTYPE ulong + +#define __CLC_GENTYPE ulong +#define __CLC_U_GENTYPE ulong +#define __CLC_S_GENTYPE long +#define __CLC_SCALAR 1 +#include __CLC_BODY +#undef __CLC_SCALAR +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ulong2 +#define __CLC_U_GENTYPE ulong2 +#define __CLC_S_GENTYPE long2 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ulong3 +#define __CLC_U_GENTYPE ulong3 +#define __CLC_S_GENTYPE long3 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ulong4 +#define __CLC_U_GENTYPE ulong4 +#define __CLC_S_GENTYPE long4 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ulong8 +#define __CLC_U_GENTYPE ulong8 +#define __CLC_S_GENTYPE long8 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#define __CLC_GENTYPE ulong16 +#define __CLC_U_GENTYPE ulong16 +#define __CLC_S_GENTYPE long16 +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_U_GENTYPE +#undef __CLC_S_GENTYPE + +#undef __CLC_GENSIZE +#undef __CLC_SCALAR_GENTYPE +#undef __CLC_BODY diff --git a/generic/include/clc/integer/rotate.h b/generic/include/clc/integer/rotate.h index e163bc8..6320223 100644 --- a/generic/include/clc/integer/rotate.h +++ b/generic/include/clc/integer/rotate.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/rotate.inc> +#define __CLC_BODY <clc/integer/rotate.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/rotate.inc b/generic/include/clc/integer/rotate.inc index 5720e1c..c97711e 100644 --- a/generic/include/clc/integer/rotate.inc +++ b/generic/include/clc/integer/rotate.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE rotate(GENTYPE x, GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE rotate(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/generic/include/clc/integer/sub_sat.h b/generic/include/clc/integer/sub_sat.h index 942274d..f841529 100644 --- a/generic/include/clc/integer/sub_sat.h +++ b/generic/include/clc/integer/sub_sat.h @@ -1,2 +1,2 @@ -#define BODY <clc/integer/sub_sat.inc> +#define __CLC_BODY <clc/integer/sub_sat.inc> #include <clc/integer/gentype.inc> diff --git a/generic/include/clc/integer/sub_sat.inc b/generic/include/clc/integer/sub_sat.inc index 3e0f8f9..425df2e 100644 --- a/generic/include/clc/integer/sub_sat.inc +++ b/generic/include/clc/integer/sub_sat.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE sub_sat(GENTYPE x, GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE sub_sat(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/generic/include/clc/math/binary_decl.inc b/generic/include/clc/math/binary_decl.inc index 1a49e26..70a7114 100644 --- a/generic/include/clc/math/binary_decl.inc +++ b/generic/include/clc/math/binary_decl.inc @@ -1,6 +1,6 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE FUNCTION(GENTYPE a, GENTYPE b); -_CLC_OVERLOAD _CLC_DECL GENTYPE FUNCTION(GENTYPE a, float b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, float b); #ifdef cl_khr_fp64 -_CLC_OVERLOAD _CLC_DECL GENTYPE FUNCTION(GENTYPE a, double b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, double b); #endif diff --git a/generic/include/clc/math/binary_intrin.inc b/generic/include/clc/math/binary_intrin.inc index 30dec7b..cfbe741 100644 --- a/generic/include/clc/math/binary_intrin.inc +++ b/generic/include/clc/math/binary_intrin.inc @@ -1,18 +1,18 @@ -_CLC_OVERLOAD float FUNCTION(float, float) __asm(INTRINSIC ".f32"); -_CLC_OVERLOAD float2 FUNCTION(float2, float2) __asm(INTRINSIC ".v2f32"); -_CLC_OVERLOAD float3 FUNCTION(float3, float3) __asm(INTRINSIC ".v3f32"); -_CLC_OVERLOAD float4 FUNCTION(float4, float4) __asm(INTRINSIC ".v4f32"); -_CLC_OVERLOAD float8 FUNCTION(float8, float8) __asm(INTRINSIC ".v8f32"); -_CLC_OVERLOAD float16 FUNCTION(float16, float16) __asm(INTRINSIC ".v16f32"); +_CLC_OVERLOAD float __CLC_FUNCTION(float, float) __asm(__CLC_INTRINSIC ".f32"); +_CLC_OVERLOAD float2 __CLC_FUNCTION(float2, float2) __asm(__CLC_INTRINSIC ".v2f32"); +_CLC_OVERLOAD float3 __CLC_FUNCTION(float3, float3) __asm(__CLC_INTRINSIC ".v3f32"); +_CLC_OVERLOAD float4 __CLC_FUNCTION(float4, float4) __asm(__CLC_INTRINSIC ".v4f32"); +_CLC_OVERLOAD float8 __CLC_FUNCTION(float8, float8) __asm(__CLC_INTRINSIC ".v8f32"); +_CLC_OVERLOAD float16 __CLC_FUNCTION(float16, float16) __asm(__CLC_INTRINSIC ".v16f32"); #ifdef cl_khr_fp64 -_CLC_OVERLOAD double FUNCTION(double, double) __asm(INTRINSIC ".f64"); -_CLC_OVERLOAD double2 FUNCTION(double2, double2) __asm(INTRINSIC ".v2f64"); -_CLC_OVERLOAD double3 FUNCTION(double3, double3) __asm(INTRINSIC ".v3f64"); -_CLC_OVERLOAD double4 FUNCTION(double4, double4) __asm(INTRINSIC ".v4f64"); -_CLC_OVERLOAD double8 FUNCTION(double8, double8) __asm(INTRINSIC ".v8f64"); -_CLC_OVERLOAD double16 FUNCTION(double16, double16) __asm(INTRINSIC ".v16f64"); +_CLC_OVERLOAD double __CLC_FUNCTION(double, double) __asm(__CLC_INTRINSIC ".f64"); +_CLC_OVERLOAD double2 __CLC_FUNCTION(double2, double2) __asm(__CLC_INTRINSIC ".v2f64"); +_CLC_OVERLOAD double3 __CLC_FUNCTION(double3, double3) __asm(__CLC_INTRINSIC ".v3f64"); +_CLC_OVERLOAD double4 __CLC_FUNCTION(double4, double4) __asm(__CLC_INTRINSIC ".v4f64"); +_CLC_OVERLOAD double8 __CLC_FUNCTION(double8, double8) __asm(__CLC_INTRINSIC ".v8f64"); +_CLC_OVERLOAD double16 __CLC_FUNCTION(double16, double16) __asm(__CLC_INTRINSIC ".v16f64"); #endif -#undef FUNCTION -#undef INTRINSIC +#undef __CLC_FUNCTION +#undef __CLC_INTRINSIC diff --git a/generic/include/clc/math/ceil.h b/generic/include/clc/math/ceil.h index b8e4b08..5b40abf 100644 --- a/generic/include/clc/math/ceil.h +++ b/generic/include/clc/math/ceil.h @@ -1,6 +1,6 @@ #undef ceil #define ceil __clc_ceil -#define FUNCTION __clc_ceil -#define INTRINSIC "llvm.ceil" +#define __CLC_FUNCTION __clc_ceil +#define __CLC_INTRINSIC "llvm.ceil" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/cos.h b/generic/include/clc/math/cos.h index e876c1a..974f9d1 100644 --- a/generic/include/clc/math/cos.h +++ b/generic/include/clc/math/cos.h @@ -1,6 +1,6 @@ #undef cos #define cos __clc_cos -#define FUNCTION __clc_cos -#define INTRINSIC "llvm.cos" +#define __CLC_FUNCTION __clc_cos +#define __CLC_INTRINSIC "llvm.cos" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/exp2.h b/generic/include/clc/math/exp2.h index fe91633..ec0dad2 100644 --- a/generic/include/clc/math/exp2.h +++ b/generic/include/clc/math/exp2.h @@ -1,6 +1,6 @@ #undef exp2 #define exp2 __clc_exp2 -#define FUNCTION __clc_exp2 -#define INTRINSIC "llvm.exp2" +#define __CLC_FUNCTION __clc_exp2 +#define __CLC_INTRINSIC "llvm.exp2" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/fabs.h b/generic/include/clc/math/fabs.h index 4da013c..ee2f893 100644 --- a/generic/include/clc/math/fabs.h +++ b/generic/include/clc/math/fabs.h @@ -1,6 +1,6 @@ #undef fabs #define fabs __clc_fabs -#define FUNCTION __clc_fabs -#define INTRINSIC "llvm.fabs" +#define __CLC_FUNCTION __clc_fabs +#define __CLC_INTRINSIC "llvm.fabs" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/floor.h b/generic/include/clc/math/floor.h index abb7c2a..2337d35 100644 --- a/generic/include/clc/math/floor.h +++ b/generic/include/clc/math/floor.h @@ -1,6 +1,6 @@ #undef floor #define floor __clc_floor -#define FUNCTION __clc_floor -#define INTRINSIC "llvm.floor" +#define __CLC_FUNCTION __clc_floor +#define __CLC_INTRINSIC "llvm.floor" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/fma.h b/generic/include/clc/math/fma.h index 8d862fa..02d39f6 100644 --- a/generic/include/clc/math/fma.h +++ b/generic/include/clc/math/fma.h @@ -1,6 +1,6 @@ #undef fma #define fma __clc_fma -#define FUNCTION __clc_fma -#define INTRINSIC "llvm.fma" +#define __CLC_FUNCTION __clc_fma +#define __CLC_INTRINSIC "llvm.fma" #include <clc/math/ternary_intrin.inc> diff --git a/generic/include/clc/math/fmax.h b/generic/include/clc/math/fmax.h index d26e5d6..d6956af 100644 --- a/generic/include/clc/math/fmax.h +++ b/generic/include/clc/math/fmax.h @@ -1,11 +1,11 @@ #undef fmax #define fmax __clc_fmax -#define BODY <clc/math/binary_decl.inc> -#define FUNCTION __clc_fmax +#define __CLC_BODY <clc/math/binary_decl.inc> +#define __CLC_FUNCTION __clc_fmax #include <clc/math/gentype.inc> -#undef BODY -#undef FUNCTION +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/generic/include/clc/math/fmin.h b/generic/include/clc/math/fmin.h index 3506aef..5588ba9 100644 --- a/generic/include/clc/math/fmin.h +++ b/generic/include/clc/math/fmin.h @@ -1,11 +1,11 @@ #undef fmin #define fmin __clc_fmin -#define BODY <clc/math/binary_decl.inc> -#define FUNCTION __clc_fmin +#define __CLC_BODY <clc/math/binary_decl.inc> +#define __CLC_FUNCTION __clc_fmin #include <clc/math/gentype.inc> -#undef BODY -#undef FUNCTION +#undef __CLC_BODY +#undef __CLC_FUNCTION diff --git a/generic/include/clc/math/gentype.inc b/generic/include/clc/math/gentype.inc index 4ed2151..bff4f56 100644 --- a/generic/include/clc/math/gentype.inc +++ b/generic/include/clc/math/gentype.inc @@ -1,63 +1,63 @@ -#define SCALAR_GENTYPE float +#define __CLC_SCALAR_GENTYPE float -#define GENTYPE float -#define SCALAR -#include BODY -#undef GENTYPE -#undef SCALAR +#define __CLC_GENTYPE float +#define __CLC_SCALAR +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_SCALAR -#define GENTYPE float2 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE float2 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE float3 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE float3 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE float4 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE float4 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE float8 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE float8 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE float16 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE float16 +#include __CLC_BODY +#undef __CLC_GENTYPE -#undef SCALAR_GENTYPE +#undef __CLC_SCALAR_GENTYPE #ifdef cl_khr_fp64 -#define SCALAR_GENTYPE double +#define __CLC_SCALAR_GENTYPE double -#define SCALAR -#define GENTYPE double -#include BODY -#undef GENTYPE -#undef SCALAR +#define __CLC_SCALAR +#define __CLC_GENTYPE double +#include __CLC_BODY +#undef __CLC_GENTYPE +#undef __CLC_SCALAR -#define GENTYPE double2 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE double2 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE double3 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE double3 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE double4 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE double4 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE double8 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE double8 +#include __CLC_BODY +#undef __CLC_GENTYPE -#define GENTYPE double16 -#include BODY -#undef GENTYPE +#define __CLC_GENTYPE double16 +#include __CLC_BODY +#undef __CLC_GENTYPE -#undef SCALAR_GENTYPE +#undef __CLC_SCALAR_GENTYPE #endif -#undef BODY +#undef __CLC_BODY diff --git a/generic/include/clc/math/hypot.h b/generic/include/clc/math/hypot.h index 9ffda48..c00eb45 100644 --- a/generic/include/clc/math/hypot.h +++ b/generic/include/clc/math/hypot.h @@ -1,2 +1,2 @@ -#define BODY <clc/math/hypot.inc> +#define __CLC_BODY <clc/math/hypot.inc> #include <clc/math/gentype.inc> diff --git a/generic/include/clc/math/hypot.inc b/generic/include/clc/math/hypot.inc index 2f97ee5..08b4605 100644 --- a/generic/include/clc/math/hypot.inc +++ b/generic/include/clc/math/hypot.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE hypot(GENTYPE x, GENTYPE y); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE hypot(__CLC_GENTYPE x, __CLC_GENTYPE y); diff --git a/generic/include/clc/math/log2.h b/generic/include/clc/math/log2.h index d8a8842..8801240 100644 --- a/generic/include/clc/math/log2.h +++ b/generic/include/clc/math/log2.h @@ -1,6 +1,6 @@ #undef log2 #define log2 __clc_log2 -#define FUNCTION __clc_log2 -#define INTRINSIC "llvm.log2" +#define __CLC_FUNCTION __clc_log2 +#define __CLC_INTRINSIC "llvm.log2" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/mad.h b/generic/include/clc/math/mad.h index 58f7674..c4e5084 100644 --- a/generic/include/clc/math/mad.h +++ b/generic/include/clc/math/mad.h @@ -1,2 +1,2 @@ -#define BODY <clc/math/mad.inc> +#define __CLC_BODY <clc/math/mad.inc> #include <clc/math/gentype.inc> diff --git a/generic/include/clc/math/mad.inc b/generic/include/clc/math/mad.inc index 5200d67..61194b6 100644 --- a/generic/include/clc/math/mad.inc +++ b/generic/include/clc/math/mad.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE mad(GENTYPE a, GENTYPE b, GENTYPE c); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE mad(__CLC_GENTYPE a, __CLC_GENTYPE b, __CLC_GENTYPE c); diff --git a/generic/include/clc/math/pow.h b/generic/include/clc/math/pow.h index 208d06d..320d341 100644 --- a/generic/include/clc/math/pow.h +++ b/generic/include/clc/math/pow.h @@ -1,6 +1,6 @@ #undef pow #define pow __clc_pow -#define FUNCTION __clc_pow -#define INTRINSIC "llvm.pow" +#define __CLC_FUNCTION __clc_pow +#define __CLC_INTRINSIC "llvm.pow" #include <clc/math/binary_intrin.inc> diff --git a/generic/include/clc/math/sin.h b/generic/include/clc/math/sin.h index 2216804..e50b71a 100644 --- a/generic/include/clc/math/sin.h +++ b/generic/include/clc/math/sin.h @@ -1,6 +1,6 @@ #undef sin #define sin __clc_sin -#define FUNCTION __clc_sin -#define INTRINSIC "llvm.sin" +#define __CLC_FUNCTION __clc_sin +#define __CLC_INTRINSIC "llvm.sin" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/sqrt.h b/generic/include/clc/math/sqrt.h index a000e24..f69de84 100644 --- a/generic/include/clc/math/sqrt.h +++ b/generic/include/clc/math/sqrt.h @@ -1,6 +1,6 @@ #undef sqrt #define sqrt __clc_sqrt -#define FUNCTION __clc_sqrt -#define INTRINSIC "llvm.sqrt" +#define __CLC_FUNCTION __clc_sqrt +#define __CLC_INTRINSIC "llvm.sqrt" #include <clc/math/unary_intrin.inc> diff --git a/generic/include/clc/math/ternary_intrin.inc b/generic/include/clc/math/ternary_intrin.inc index 7d451e9..9633696 100644 --- a/generic/include/clc/math/ternary_intrin.inc +++ b/generic/include/clc/math/ternary_intrin.inc @@ -1,18 +1,18 @@ -_CLC_OVERLOAD float FUNCTION(float, float, float) __asm(INTRINSIC ".f32"); -_CLC_OVERLOAD float2 FUNCTION(float2, float2, float2) __asm(INTRINSIC ".v2f32"); -_CLC_OVERLOAD float3 FUNCTION(float3, float3, float3) __asm(INTRINSIC ".v3f32"); -_CLC_OVERLOAD float4 FUNCTION(float4, float4, float4) __asm(INTRINSIC ".v4f32"); -_CLC_OVERLOAD float8 FUNCTION(float8, float8, float8) __asm(INTRINSIC ".v8f32"); -_CLC_OVERLOAD float16 FUNCTION(float16, float16, float16) __asm(INTRINSIC ".v16f32"); +_CLC_OVERLOAD float __CLC_FUNCTION(float, float, float) __asm(__CLC_INTRINSIC ".f32"); +_CLC_OVERLOAD float2 __CLC_FUNCTION(float2, float2, float2) __asm(__CLC_INTRINSIC ".v2f32"); +_CLC_OVERLOAD float3 __CLC_FUNCTION(float3, float3, float3) __asm(__CLC_INTRINSIC ".v3f32"); +_CLC_OVERLOAD float4 __CLC_FUNCTION(float4, float4, float4) __asm(__CLC_INTRINSIC ".v4f32"); +_CLC_OVERLOAD float8 __CLC_FUNCTION(float8, float8, float8) __asm(__CLC_INTRINSIC ".v8f32"); +_CLC_OVERLOAD float16 __CLC_FUNCTION(float16, float16, float16) __asm(__CLC_INTRINSIC ".v16f32"); #ifdef cl_khr_fp64 -_CLC_OVERLOAD double FUNCTION(double, double, double) __asm(INTRINSIC ".f64"); -_CLC_OVERLOAD double2 FUNCTION(double2, double2, double2) __asm(INTRINSIC ".v2f64"); -_CLC_OVERLOAD double3 FUNCTION(double3, double3, double3) __asm(INTRINSIC ".v3f64"); -_CLC_OVERLOAD double4 FUNCTION(double4, double4, double4) __asm(INTRINSIC ".v4f64"); -_CLC_OVERLOAD double8 FUNCTION(double8, double8, double8) __asm(INTRINSIC ".v8f64"); -_CLC_OVERLOAD double16 FUNCTION(double16, double16, double16) __asm(INTRINSIC ".v16f64"); +_CLC_OVERLOAD double __CLC_FUNCTION(double, double, double) __asm(__CLC_INTRINSIC ".f64"); +_CLC_OVERLOAD double2 __CLC_FUNCTION(double2, double2, double2) __asm(__CLC_INTRINSIC ".v2f64"); +_CLC_OVERLOAD double3 __CLC_FUNCTION(double3, double3, double3) __asm(__CLC_INTRINSIC ".v3f64"); +_CLC_OVERLOAD double4 __CLC_FUNCTION(double4, double4, double4) __asm(__CLC_INTRINSIC ".v4f64"); +_CLC_OVERLOAD double8 __CLC_FUNCTION(double8, double8, double8) __asm(__CLC_INTRINSIC ".v8f64"); +_CLC_OVERLOAD double16 __CLC_FUNCTION(double16, double16, double16) __asm(__CLC_INTRINSIC ".v16f64"); #endif -#undef FUNCTION -#undef INTRINSIC +#undef __CLC_FUNCTION +#undef __CLC_INTRINSIC diff --git a/generic/include/clc/math/unary_decl.inc b/generic/include/clc/math/unary_decl.inc index 392c4d6..9858d90 100644 --- a/generic/include/clc/math/unary_decl.inc +++ b/generic/include/clc/math/unary_decl.inc @@ -1 +1 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE FUNCTION(GENTYPE x); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE x); diff --git a/generic/include/clc/math/unary_intrin.inc b/generic/include/clc/math/unary_intrin.inc index 2da5a9c..8c62d88 100644 --- a/generic/include/clc/math/unary_intrin.inc +++ b/generic/include/clc/math/unary_intrin.inc @@ -1,18 +1,18 @@ -_CLC_OVERLOAD float FUNCTION(float f) __asm(INTRINSIC ".f32"); -_CLC_OVERLOAD float2 FUNCTION(float2 f) __asm(INTRINSIC ".v2f32"); -_CLC_OVERLOAD float3 FUNCTION(float3 f) __asm(INTRINSIC ".v3f32"); -_CLC_OVERLOAD float4 FUNCTION(float4 f) __asm(INTRINSIC ".v4f32"); -_CLC_OVERLOAD float8 FUNCTION(float8 f) __asm(INTRINSIC ".v8f32"); -_CLC_OVERLOAD float16 FUNCTION(float16 f) __asm(INTRINSIC ".v16f32"); +_CLC_OVERLOAD float __CLC_FUNCTION(float f) __asm(__CLC_INTRINSIC ".f32"); +_CLC_OVERLOAD float2 __CLC_FUNCTION(float2 f) __asm(__CLC_INTRINSIC ".v2f32"); +_CLC_OVERLOAD float3 __CLC_FUNCTION(float3 f) __asm(__CLC_INTRINSIC ".v3f32"); +_CLC_OVERLOAD float4 __CLC_FUNCTION(float4 f) __asm(__CLC_INTRINSIC ".v4f32"); +_CLC_OVERLOAD float8 __CLC_FUNCTION(float8 f) __asm(__CLC_INTRINSIC ".v8f32"); +_CLC_OVERLOAD float16 __CLC_FUNCTION(float16 f) __asm(__CLC_INTRINSIC ".v16f32"); #ifdef cl_khr_fp64 -_CLC_OVERLOAD double FUNCTION(double d) __asm(INTRINSIC ".f64"); -_CLC_OVERLOAD double2 FUNCTION(double2 d) __asm(INTRINSIC ".v2f64"); -_CLC_OVERLOAD double3 FUNCTION(double3 d) __asm(INTRINSIC ".v3f64"); -_CLC_OVERLOAD double4 FUNCTION(double4 d) __asm(INTRINSIC ".v4f64"); -_CLC_OVERLOAD double8 FUNCTION(double8 d) __asm(INTRINSIC ".v8f64"); -_CLC_OVERLOAD double16 FUNCTION(double16 d) __asm(INTRINSIC ".v16f64"); +_CLC_OVERLOAD double __CLC_FUNCTION(double d) __asm(__CLC_INTRINSIC ".f64"); +_CLC_OVERLOAD double2 __CLC_FUNCTION(double2 d) __asm(__CLC_INTRINSIC ".v2f64"); +_CLC_OVERLOAD double3 __CLC_FUNCTION(double3 d) __asm(__CLC_INTRINSIC ".v3f64"); +_CLC_OVERLOAD double4 __CLC_FUNCTION(double4 d) __asm(__CLC_INTRINSIC ".v4f64"); +_CLC_OVERLOAD double8 __CLC_FUNCTION(double8 d) __asm(__CLC_INTRINSIC ".v8f64"); +_CLC_OVERLOAD double16 __CLC_FUNCTION(double16 d) __asm(__CLC_INTRINSIC ".v16f64"); #endif -#undef FUNCTION -#undef INTRINSIC +#undef __CLC_FUNCTION +#undef __CLC_INTRINSIC diff --git a/generic/include/clc/shared/clamp.h b/generic/include/clc/shared/clamp.h index 5c2ebd0..a389b85 100644 --- a/generic/include/clc/shared/clamp.h +++ b/generic/include/clc/shared/clamp.h @@ -1,5 +1,5 @@ -#define BODY <clc/shared/clamp.inc> +#define __CLC_BODY <clc/shared/clamp.inc> #include <clc/integer/gentype.inc> -#define BODY <clc/shared/clamp.inc> +#define __CLC_BODY <clc/shared/clamp.inc> #include <clc/math/gentype.inc> diff --git a/generic/include/clc/shared/clamp.inc b/generic/include/clc/shared/clamp.inc index 67c8142..aaff9d0 100644 --- a/generic/include/clc/shared/clamp.inc +++ b/generic/include/clc/shared/clamp.inc @@ -1,5 +1,5 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE clamp(GENTYPE x, GENTYPE y, GENTYPE z); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_GENTYPE y, __CLC_GENTYPE z); -#ifndef SCALAR -_CLC_OVERLOAD _CLC_DECL GENTYPE clamp(GENTYPE x, SCALAR_GENTYPE y, SCALAR_GENTYPE z); +#ifndef __CLC_SCALAR +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, __CLC_SCALAR_GENTYPE y, __CLC_SCALAR_GENTYPE z); #endif diff --git a/generic/include/clc/shared/max.h b/generic/include/clc/shared/max.h index 7967d4a..ee20b9e 100644 --- a/generic/include/clc/shared/max.h +++ b/generic/include/clc/shared/max.h @@ -1,5 +1,5 @@ -#define BODY <clc/shared/max.inc> +#define __CLC_BODY <clc/shared/max.inc> #include <clc/integer/gentype.inc> -#define BODY <clc/shared/max.inc> +#define __CLC_BODY <clc/shared/max.inc> #include <clc/math/gentype.inc> diff --git a/generic/include/clc/shared/max.inc b/generic/include/clc/shared/max.inc index 9fe73c4..5901074 100644 --- a/generic/include/clc/shared/max.inc +++ b/generic/include/clc/shared/max.inc @@ -1,5 +1,5 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, GENTYPE b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, __CLC_GENTYPE b); -#ifndef SCALAR -_CLC_OVERLOAD _CLC_DECL GENTYPE max(GENTYPE a, SCALAR_GENTYPE b); +#ifndef __CLC_SCALAR +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b); #endif diff --git a/generic/include/clc/shared/min.h b/generic/include/clc/shared/min.h index e16b45d..e11d9f9 100644 --- a/generic/include/clc/shared/min.h +++ b/generic/include/clc/shared/min.h @@ -1,5 +1,5 @@ -#define BODY <clc/shared/min.inc> +#define __CLC_BODY <clc/shared/min.inc> #include <clc/integer/gentype.inc> -#define BODY <clc/shared/min.inc> +#define __CLC_BODY <clc/shared/min.inc> #include <clc/math/gentype.inc> diff --git a/generic/include/clc/shared/min.inc b/generic/include/clc/shared/min.inc index cf3afaf..d8c1568 100644 --- a/generic/include/clc/shared/min.inc +++ b/generic/include/clc/shared/min.inc @@ -1,5 +1,5 @@ -_CLC_OVERLOAD _CLC_DECL GENTYPE min(GENTYPE a, GENTYPE b); +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_GENTYPE b); -#ifndef SCALAR -_CLC_OVERLOAD _CLC_DECL GENTYPE min(GENTYPE a, SCALAR_GENTYPE b); -#endif
\ No newline at end of file +#ifndef __CLC_SCALAR +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, __CLC_SCALAR_GENTYPE b); +#endif |