Closed
Description
SYCL 2020 rev. 4 specifies that SYCL should accept span for array reductions here, but it isn't currently supported.
For example, I think the following code should work:
int *histogram = sycl::malloc_shared<int>(16,q);
q.submit([&](sycl::handler &h) {
h.parallel_for(sycl::range<1>(N),
sycl::reduction(sycl::span<int>(histogram,16), std::plus<>()),
[=](sycl::id<1> i, auto &histo) {
histo[i%16] += 1;
});
});