summaryrefslogtreecommitdiffstats
path: root/renderscript/include
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-03-05 10:02:12 -0800
committerTim Murray <timmurray@google.com>2013-03-07 15:21:45 -0800
commit88a6d119d146c9219eba2cba0b086d66f583b8c3 (patch)
treeca61df684e0007594354f1142efa4f495586d78f /renderscript/include
parent22dfc2b2cb21b56e893be494b664e3f4fc85d1b7 (diff)
downloadprebuilts_sdk-88a6d119d146c9219eba2cba0b086d66f583b8c3.zip
prebuilts_sdk-88a6d119d146c9219eba2cba0b086d66f583b8c3.tar.gz
prebuilts_sdk-88a6d119d146c9219eba2cba0b086d66f583b8c3.tar.bz2
Update RS prebuilts and add x86 support.
Change-Id: I0b6a5312d6d76482586d651eaaf6651bed3a1627
Diffstat (limited to 'renderscript/include')
-rw-r--r--renderscript/include/rs_allocation.rsh52
1 files changed, 28 insertions, 24 deletions
diff --git a/renderscript/include/rs_allocation.rsh b/renderscript/include/rs_allocation.rsh
index 46ff3cf..cefd09f 100644
--- a/renderscript/include/rs_allocation.rsh
+++ b/renderscript/include/rs_allocation.rsh
@@ -147,19 +147,29 @@ extern const void * __attribute__((overloadable))
rsGetElementAt(rs_allocation, uint32_t x, uint32_t y, uint32_t z);
-#define GET_ELEMENT_AT(T) \
-static inline T __attribute__((overloadable)) \
- rsGetElementAt_##T(rs_allocation a, uint32_t x) { \
- return ((T *)rsGetElementAt(a, x))[0]; \
-} \
-static inline T __attribute__((overloadable)) \
- rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y) { \
- return ((T *)rsGetElementAt(a, x, y))[0]; \
-} \
-static inline T __attribute__((overloadable)) \
- rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { \
- return ((T *)rsGetElementAt(a, x, y, z))[0]; \
-}
+#if (defined(RS_VERSION) && (RS_VERSION >= 18))
+ #define GET_ELEMENT_AT(T) \
+ extern T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x); \
+ extern T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y); \
+ extern T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z);
+#else
+ #define GET_ELEMENT_AT(T) \
+ static inline T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x) { \
+ return ((T *)rsGetElementAt(a, x))[0]; \
+ } \
+ static inline T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y) { \
+ return ((T *)rsGetElementAt(a, x, y))[0]; \
+ } \
+ static inline T __attribute__((overloadable)) \
+ rsGetElementAt_##T(rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { \
+ return ((T *)rsGetElementAt(a, x, y, z))[0]; \
+ }
+#endif
GET_ELEMENT_AT(char)
GET_ELEMENT_AT(char2)
@@ -289,18 +299,12 @@ extern void __attribute__((overloadable))
#define SET_ELEMENT_AT(T) \
extern void __attribute__((overloadable)) \
- __rsSetElementAt_##T(rs_allocation a, T val, uint32_t x); \
+ rsSetElementAt_##T(rs_allocation a, T val, uint32_t x); \
extern void __attribute__((overloadable)) \
- __rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y); \
- \
- static inline void __attribute__((overloadable)) \
- rsSetElementAt_##T(rs_allocation a, T val, uint32_t x) { \
- __rsSetElementAt_##T(a, val, x); \
- } \
- static inline void __attribute__((overloadable)) \
- rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y) { \
- __rsSetElementAt_##T(a, val, x, y); \
- } \
+ rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y); \
+ extern void __attribute__((overloadable)) \
+ rsSetElementAt_##T(rs_allocation a, T val, uint32_t x, uint32_t y, uint32_t z);
+
SET_ELEMENT_AT(char)
SET_ELEMENT_AT(char2)