I’ve come across a segmentation fault with ComputeCpp 1.1.3 with the code below on Ubuntu 19.04 and the Intel CPU driver. Do you see it at your side?
#include <iostream>
#include <CL/sycl.hpp>
// segfault on ComputeCpp 1.1.3
namespace kernels { class K; }
int main(int argc, char *argv[])
{
using namespace cl::sycl;
int data[64];
queue q;
const int w = 3;
{
buffer<int,1> buf(data,range<1>{64});
q.submit([&](handler &cgh) {
auto acc = buf.get_access<access::mode::read_write>(cgh);
auto r = range<3>{4,4,4};
cgh.parallel_for<kernels::K>(r, [=](item<3> ix) {
const int offset = w;
acc[ix.get_linear_id()] = offset;
});
});
}
for (const auto i : data) { std::cout << i; }
std::cout << '\n';
return 0;
}