Boost logo

Boost Users :

From: Stephan Menzel (stephan.menzel_at_[hidden])
Date: 2021-08-30 11:52:13


Hello everyone,

I have recently made the switched an existing OpenCL application to boost
compute. For reasons mostly.

Now the transition went well for the most part but I struggle with one
feature that appears to be missing. The determination of the local work
group size.

Originally the code was using clEnqueueNDRangeKernel() which has an option
for the local work group size called local_work_size. When left empty, the
system will determine that value itself at a small cost.

Boost compute doesn't seem to have that. When I process an image for
example:

command_queue.enqueue_nd_range_kernel(kernel,
        bc::extents<2>{ 0, current_line },
        bc::extents<2>{ width, height },
        bc::extents<2>{ 128, 1 });

The last parameter is very hard for me to understand. I know roughly what
it is and I understand it has to be dividable by 64, the total size (width
* height) however has to be a multiple of it too, so there's a bunch of
rules that apply and I would much rather leave that auto-determined as it
was before. Leaving it bc::extents<2>{ 0, 0 } throws an assertion.

So, essentially: Is there a way to leave it empty to be auto-defined?

Cheers,

Stephan



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net