I have tried to type in and run the program in the SYCL guide, section about memory: https://developer.codeplay.com/products/computecpp/ce/guides/sycl-guide/memory
However, it will not compile because of two things related to the global memory:
auto global_mem = buf.get_access<sycl::access::mode::read>();
First, given that we assign to it later, shouldn’t it be access mode read_write
? This is easy to change.
Secondly, the compiler believes it’s a host buffer and therefore it will not accept references to it in the SYCL kernel. I have tried to find other accessor constructors and get methods, without success and would need some help here.
Regards
Mats