[Compute] Auto-determine work group size

Stephan Menzel via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <CAEQ568skZJ9DKY+fXMX=34v37ikWXQa+2a-MBUmUhgJ082TX0A@mail.gmail.com>
Hi everyone,

perhaps someone can answer a question about Boost.Compute. I have recently
switched to it from using native OpenCL.
Most of the things work fine except for one quirk:

OpenCL allows for auto-determining the work group size when using
enqueue_kernel(). As the correct work group size is still a mystery to me
after using OpenCl for almost a year now I normally left this parameter to
0 to let OpenCL figure it out.

With Boost.Compute and the equivalent function enqueue_nd_range_kernel()
this doesn't seem to be possible. I have to use a parameter like

boost::compute::extents<2>{ 8, 2 }

as local_work_size. Leaving it 0 or using extents<2>{ 0, 0 } doesn't do the
trick and I'm getting "Invalid work group size". This forces me to guess
values until one works, which is extremely error prone and breaks all the
time with images of different resolutions.
Does anyone know how I can use OpenCL's auto-work-group-size feature in
Boost.Compute?

Cheers,
Stephan

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.