[Beignet] [PATCH 1/2] GBE: add some macros for atom_xxx builtin functions.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Aug 29 20:16:23 PDT 2013


The atom_xxx APIs are on OpenCL spec 1.0, but the conformance test suite
will tes them anyway.

Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
---
 backend/src/ocl_stdlib.tmpl.h |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/backend/src/ocl_stdlib.tmpl.h b/backend/src/ocl_stdlib.tmpl.h
index c428fac..ddad29a 100644
--- a/backend/src/ocl_stdlib.tmpl.h
+++ b/backend/src/ocl_stdlib.tmpl.h
@@ -1458,6 +1458,21 @@ DECL_ATOMIC_OP(cmpxchg)
 #undef DECL_ATOMIC_OP_TYPE
 #undef DECL_ATOMIC_OP_SPACE
 
+// XXX for conformance test
+// The following atom_xxx api is on OpenCL spec 1.0.
+// But the conformance test suite will tes them anyway.
+#define atom_add atomic_add
+#define atom_sub atomic_sub
+#define atom_and atomic_and
+#define atom_or atomic_or
+#define atom_xor atomic_xor
+#define atom_xchg atomic_xchg
+#define atom_min atomic_min
+#define atom_max atomic_max
+#define atom_inc atomic_inc
+#define atom_dec atomic_dec
+#define atom_cmpxchg atomic_cmpxchg
+
 /////////////////////////////////////////////////////////////////////////////
 // Force the compilation to SIMD8 or SIMD16
 /////////////////////////////////////////////////////////////////////////////
-- 
1.7.9.5



More information about the Beignet mailing list