[Beignet] [Patch v2 03/10] gbe/libocl: change xxx_fence function to OVERLOADABLE.

xionghu.luo at intel.com xionghu.luo at intel.com
Wed Nov 25 21:59:58 PST 2015


From: Luo Xionghu <xionghu.luo at intel.com>

the mem_fence, read_mem_fence and write_mem_fence functions need
be OVERLOADABLE for link.

Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
 backend/src/libocl/include/ocl_sync.h | 6 +++---
 backend/src/libocl/src/ocl_sync.cl    | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/backend/src/libocl/include/ocl_sync.h b/backend/src/libocl/include/ocl_sync.h
index 1d90cae..312928e 100644
--- a/backend/src/libocl/include/ocl_sync.h
+++ b/backend/src/libocl/include/ocl_sync.h
@@ -28,9 +28,9 @@
 
 typedef uint cl_mem_fence_flags;
 OVERLOADABLE void barrier(cl_mem_fence_flags flags);
-void mem_fence(cl_mem_fence_flags flags);
-void read_mem_fence(cl_mem_fence_flags flags);
-void write_mem_fence(cl_mem_fence_flags flags);
 OVERLOADABLE void debugwait(void);
+OVERLOADABLE void mem_fence(cl_mem_fence_flags flags);
+OVERLOADABLE void read_mem_fence(cl_mem_fence_flags flags);
+OVERLOADABLE void write_mem_fence(cl_mem_fence_flags flags);
 
 #endif  /* __OCL_SYNC_H__ */
diff --git a/backend/src/libocl/src/ocl_sync.cl b/backend/src/libocl/src/ocl_sync.cl
index 70d6f26..b6efef8 100644
--- a/backend/src/libocl/src/ocl_sync.cl
+++ b/backend/src/libocl/src/ocl_sync.cl
@@ -22,11 +22,11 @@ void __gen_ocl_barrier_global(void);
 void __gen_ocl_barrier_local_and_global(void);
 void __gen_ocl_debugwait(void);
 
-void mem_fence(cl_mem_fence_flags flags) {
+OVERLOADABLE void mem_fence(cl_mem_fence_flags flags) {
 }
 
-void read_mem_fence(cl_mem_fence_flags flags) {
+OVERLOADABLE void read_mem_fence(cl_mem_fence_flags flags) {
 }
 
-void write_mem_fence(cl_mem_fence_flags flags) {
+OVERLOADABLE void write_mem_fence(cl_mem_fence_flags flags) {
 }
-- 
1.9.1



More information about the Beignet mailing list