DPCT1065

Message

Consider replacing sycl::nd_item::barrier() with sycl::nd_item::barrier(sycl::access::fence_space::local_space) for better performance, if there is no access to global memory .

Detailed Help

The function sycl::nd_item::barrier() ensures correct memory access ordering in the global and local address space. If the kernel function has no memory accesses in the global memory, it is safe to replace sycl::nd_item::barrier() with sycl::nd_item::barrier(sycl::access::fence_space::local_space) for better performance.

Suggestions to Fix

Replace sycl::nd_item::barrier() with sycl::nd_item::barrier(sycl::access::fence_space::local_space).