Specs require using fences when barrier() is invoked: "The barrier function will either flush any variables stored in local memory or queue a memory fence to ensure correct ordering of memory operations to local memory." and "The barrier function will queue a memory fence to ensure correct ordering of memory operations to global memory." Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Aaron Watry <awatry@gmail.com> Tested-by: Aaron Watry <awatry@gmail.com> llvm-svn: 311022
8 lines
124 B
Common Lisp
8 lines
124 B
Common Lisp
#include <clc/clc.h>
|
|
|
|
_CLC_DEF void barrier(cl_mem_fence_flags flags)
|
|
{
|
|
mem_fence(flags);
|
|
__builtin_amdgcn_s_barrier();
|
|
}
|