[Libclc-dev] [PATCH] s/_CLC_DECL/_CLC_DEF/
Tom Stellard
tom at stellard.net
Tue Oct 22 19:24:58 PDT 2013
From: Tom Stellard <thomas.stellard at amd.com>
Some function definitions were using _CLC_DEF, which meant that they
weren't being marked as always_inline.
---
generic/lib/integer/mul_hi.cl | 16 ++++++++--------
generic/lib/integer/upsample.cl | 12 ++++++------
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/generic/lib/integer/mul_hi.cl b/generic/lib/integer/mul_hi.cl
index 4c02efb..174d893 100644
--- a/generic/lib/integer/mul_hi.cl
+++ b/generic/lib/integer/mul_hi.cl
@@ -2,7 +2,7 @@
//For all types EXCEPT long, which is implemented separately
#define __CLC_MUL_HI_IMPL(BGENTYPE, GENTYPE, GENSIZE) \
- _CLC_OVERLOAD _CLC_DECL GENTYPE mul_hi(GENTYPE x, GENTYPE y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE mul_hi(GENTYPE x, GENTYPE y){ \
return (GENTYPE)(((BGENTYPE)x * (BGENTYPE)y) >> GENSIZE); \
} \
@@ -13,7 +13,7 @@
// and b and d are the low-order parts of x and y.
// Thinking back to algebra, we use FOIL to do the work.
-_CLC_OVERLOAD _CLC_DECL long mul_hi(long x, long y){
+_CLC_OVERLOAD _CLC_DEF long mul_hi(long x, long y){
long f, o, i;
ulong l;
@@ -41,7 +41,7 @@ _CLC_OVERLOAD _CLC_DECL long mul_hi(long x, long y){
return (long)(f + (hadd(o, (i + (long)((ulong)l>>32))) >> 31));
}
-_CLC_OVERLOAD _CLC_DECL ulong mul_hi(ulong x, ulong y){
+_CLC_OVERLOAD _CLC_DEF ulong mul_hi(ulong x, ulong y){
ulong f, o, i;
ulong l;
@@ -70,19 +70,19 @@ _CLC_OVERLOAD _CLC_DECL ulong mul_hi(ulong x, ulong y){
}
#define __CLC_MUL_HI_VEC(GENTYPE) \
- _CLC_OVERLOAD _CLC_DECL GENTYPE##2 mul_hi(GENTYPE##2 x, GENTYPE##2 y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE##2 mul_hi(GENTYPE##2 x, GENTYPE##2 y){ \
return (GENTYPE##2){mul_hi(x.s0, y.s0), mul_hi(x.s1, y.s1)}; \
} \
- _CLC_OVERLOAD _CLC_DECL GENTYPE##3 mul_hi(GENTYPE##3 x, GENTYPE##3 y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE##3 mul_hi(GENTYPE##3 x, GENTYPE##3 y){ \
return (GENTYPE##3){mul_hi(x.s0, y.s0), mul_hi(x.s1, y.s1), mul_hi(x.s2, y.s2)}; \
} \
- _CLC_OVERLOAD _CLC_DECL GENTYPE##4 mul_hi(GENTYPE##4 x, GENTYPE##4 y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE##4 mul_hi(GENTYPE##4 x, GENTYPE##4 y){ \
return (GENTYPE##4){mul_hi(x.lo, y.lo), mul_hi(x.hi, y.hi)}; \
} \
- _CLC_OVERLOAD _CLC_DECL GENTYPE##8 mul_hi(GENTYPE##8 x, GENTYPE##8 y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE##8 mul_hi(GENTYPE##8 x, GENTYPE##8 y){ \
return (GENTYPE##8){mul_hi(x.lo, y.lo), mul_hi(x.hi, y.hi)}; \
} \
- _CLC_OVERLOAD _CLC_DECL GENTYPE##16 mul_hi(GENTYPE##16 x, GENTYPE##16 y){ \
+ _CLC_OVERLOAD _CLC_DEF GENTYPE##16 mul_hi(GENTYPE##16 x, GENTYPE##16 y){ \
return (GENTYPE##16){mul_hi(x.lo, y.lo), mul_hi(x.hi, y.hi)}; \
} \
diff --git a/generic/lib/integer/upsample.cl b/generic/lib/integer/upsample.cl
index 7301cc3..da77315 100644
--- a/generic/lib/integer/upsample.cl
+++ b/generic/lib/integer/upsample.cl
@@ -1,22 +1,22 @@
#include <clc/clc.h>
#define __CLC_UPSAMPLE_IMPL(BGENTYPE, GENTYPE, UGENTYPE, GENSIZE) \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE upsample(GENTYPE hi, UGENTYPE lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE upsample(GENTYPE hi, UGENTYPE lo){ \
return ((BGENTYPE)hi << GENSIZE) | lo; \
} \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE##2 upsample(GENTYPE##2 hi, UGENTYPE##2 lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE##2 upsample(GENTYPE##2 hi, UGENTYPE##2 lo){ \
return (BGENTYPE##2){upsample(hi.s0, lo.s0), upsample(hi.s1, lo.s1)}; \
} \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE##3 upsample(GENTYPE##3 hi, UGENTYPE##3 lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE##3 upsample(GENTYPE##3 hi, UGENTYPE##3 lo){ \
return (BGENTYPE##3){upsample(hi.s0, lo.s0), upsample(hi.s1, lo.s1), upsample(hi.s2, lo.s2)}; \
} \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE##4 upsample(GENTYPE##4 hi, UGENTYPE##4 lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE##4 upsample(GENTYPE##4 hi, UGENTYPE##4 lo){ \
return (BGENTYPE##4){upsample(hi.lo, lo.lo), upsample(hi.hi, lo.hi)}; \
} \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE##8 upsample(GENTYPE##8 hi, UGENTYPE##8 lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE##8 upsample(GENTYPE##8 hi, UGENTYPE##8 lo){ \
return (BGENTYPE##8){upsample(hi.lo, lo.lo), upsample(hi.hi, lo.hi)}; \
} \
- _CLC_OVERLOAD _CLC_DECL BGENTYPE##16 upsample(GENTYPE##16 hi, UGENTYPE##16 lo){ \
+ _CLC_OVERLOAD _CLC_DEF BGENTYPE##16 upsample(GENTYPE##16 hi, UGENTYPE##16 lo){ \
return (BGENTYPE##16){upsample(hi.lo, lo.lo), upsample(hi.hi, lo.hi)}; \
} \
--
1.7.11.4
More information about the Libclc-dev
mailing list