title: Is it practical to write to a global buffer without synchronization with OpenCL?
body: <p>I'm considering an interesting problem in which it may be possible to increase performance beyond that of a typical program by allowing kernels to write their outputs to memory without performing any synchronization. </p>
  
  <p>I'm computing the voxelization from a mesh, and it is not required for the voxels on the inside of the mesh to be filled. This makes the problem simpler. </p>
  
  <p>I am hoping to apply the very simple algorithm where the kernel simply computes the voxels that intersect a triangle, and dispatch the kernel on each triangle of the mesh. </p>
  
  <p>My current idea is to simply have the kernel write a value to the voxels that it computes as intersecting the triangle, without applying any synchronization. It matters not to me the count of the number of triangles that a particular voxel touches, I care only that I guarantee the identification of all voxels touching any triangle. </p>
  
  <p>As such the question is can I expect this simple approach to "just work" or does there exist a possible race condition in which a voxel already marked as occupied may end up getting cleared out? </p>
  
  <p>If the problem is possible, then would making the store atomic (and incurring a performance hit) resolve the issue? </p>