diff options
author | Junyan He <junyan.he@linux.intel.com> | 2014-09-01 10:09:28 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-04 12:07:46 +0800 |
commit | f747526b0d0c03dbd510eb12ab442b963939f4c1 (patch) | |
tree | a674f52089d09ed9ab6dec7aed8e0fb7e4b51eec /backend | |
parent | 359714e40e9c8f16c8b9bf1262885abd3c699957 (diff) | |
download | beignet-f747526b0d0c03dbd510eb12ab442b963939f4c1.tar.gz |
Add the sync module into the libocl
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@intel.com>
Diffstat (limited to 'backend')
-rw-r--r-- | backend/src/libocl/include/ocl_sync.h | 18 | ||||
-rw-r--r-- | backend/src/libocl/src/ocl_sync.cl | 14 |
2 files changed, 32 insertions, 0 deletions
diff --git a/backend/src/libocl/include/ocl_sync.h b/backend/src/libocl/include/ocl_sync.h new file mode 100644 index 00000000..f9838249 --- /dev/null +++ b/backend/src/libocl/include/ocl_sync.h @@ -0,0 +1,18 @@ +#ifndef __OCL_SYNC_H__ +#define __OCL_SYNC_H__ + +#include "ocl_types.h" + +///////////////////////////////////////////////////////////////////////////// +// Synchronization functions +///////////////////////////////////////////////////////////////////////////// +#define CLK_LOCAL_MEM_FENCE (1 << 0) +#define CLK_GLOBAL_MEM_FENCE (1 << 1) + +typedef uint cl_mem_fence_flags; +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); + +#endif /* __OCL_SYNC_H__ */ diff --git a/backend/src/libocl/src/ocl_sync.cl b/backend/src/libocl/src/ocl_sync.cl new file mode 100644 index 00000000..34894507 --- /dev/null +++ b/backend/src/libocl/src/ocl_sync.cl @@ -0,0 +1,14 @@ +#include "ocl_sync.h" + +void __gen_ocl_barrier_local(void); +void __gen_ocl_barrier_global(void); +void __gen_ocl_barrier_local_and_global(void); + +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) { +} |