Anthony Chang
Anthony Chang
I am also interested in having this feature too. Also it would be very helpful if one could create a host- & device-callable function via something like `BOOST_COMPUTE_HOST_DEVICE_FUNCTION()` that expands...
I have a [WIP patch](https://github.com/boostorg/compute/compare/master...rosenrodt:pr-set-default-context) that lets you set global context at the very first call to `system::default_context()`, via an additional input argument `user_context`. Afterwards the default queue will be...
> The idea overall is ok. However, I think having something like set_default_context() or switch_default_context() would be better, because you can return the old default context. Implementation may be less...
@jszuppe Thanks for providing an example. I wasn't able to wrap my head around that but now I do. Allowing user to set default command queue instead of default context,...
> Can you provide an example? I think I can think of one, but if you already have one working it would be simpler. I just tried, using static pointer...
> We either need a single initialisation: defaults must be initialised at the same time, so the 2nd line fails as default queue was already set, or user needs to...
The PR #832 now ensures the following behaviors. Please review ```c++ vector a(10); // default device, context and queue are set command_queue user_queue; system::default_queue(&user_queue); // throws; device/context/queue mismatch ``` ```c++...
The system would check if user-provided queue is consistent with default device & context. If not, then an exception will throw telling it's context/device/queue mismatch
I think I know what the problem is. And it is not related to Boost.Compute If you have a wrapper similar to `compute::context` and let the wrapper's call `clReleaseContext` upon...
> Doesn't that commnad mean that BoostCompute::BoostCompute will not propagate to OpenCL::OpenCL to myexe? It is intended that `myexe` has zero knowledge about OpenCL and Boost.Compute used by `mylib`