Add mem_fence built-in.
authorYang Rong <rong.r.yang@intel.com>
Sat, 8 Jun 2013 04:33:36 +0000 (12:33 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Sun, 9 Jun 2013 07:46:58 +0000 (15:46 +0800)
According openCL spec, mem_fence is used to orders loads and stores of a work-item.
This is guarantee by hardware, so add empty mem_fence functions.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
backend/src/ocl_stdlib.h

index 013f4cc..46b81e1 100644 (file)
@@ -1085,6 +1085,13 @@ INLINE void barrier(cl_mem_fence_flags flags) {
     __gen_ocl_barrier_global();
 }
 
+INLINE void mem_fence(cl_mem_fence_flags flags) {
+}
+INLINE void read_mem_fence(cl_mem_fence_flags flags) {
+}
+INLINE void write_mem_fence(cl_mem_fence_flags flags) {
+}
+
 /////////////////////////////////////////////////////////////////////////////
 // Force the compilation to SIMD8 or SIMD16
 /////////////////////////////////////////////////////////////////////////////