1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <clc/clc.h> void barrier_local(void); void barrier_global(void); void barrier(cl_mem_fence_flags flags) { if (flags & CLK_LOCAL_MEM_FENCE) { barrier_local(); } if (flags & CLK_GLOBAL_MEM_FENCE) { barrier_global(); } }