void atomic_work_item_fence(cl_mem_fence_flags flags, memory_order order, memory_scope scope)
Must be set to
CLK_IMAGE_MEM_FENCEor a combination of these values ORed together; otherwise the behavior is undefined. The behavior of calling
CLK_IMAGE_MEM_FENCEORed together with either
CLK_LOCAL_MEM_FENCEis equivalent to calling
CLK_IMAGE_MEM_FENCEand the other flags. Passing both
atomic_work_item_fencewill synchronize memory operations to both local and global memory through some shared atomic action, as described in section 22.214.171.124 of the OpenCL API specficiation.
Depending on the value of order, this operation:
has no effects, if
is an acquire fence, if
is a release fence, if
is both an acquire fence and a release fence, if
is a sequentially consistent acquire and release fence, if
For images declared with the
read_write qualifier, the
atomic_work_item_fence must be called to make sure that writes to the image by a work-item become visible to that workitem on subsequent reads to that image by that work-item.