Jakub Szuppe
Jakub Szuppe
Yeah, I think you can make them public if `BOOST_COMPUTE_USE_CPP11` is defined. You can also look at https://github.com/boostorg/compute/issues/707 if you are interested in `boost::compute::valarray`.
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 straighforward...
> I think it's going to be very contrived. How could two functions, say set_default_context(context) and default_context() share the same scoped static variable default_context? We cannot use global static variable...
> In fact, with current static object, I observed static context object (instead of pointer) sometimes gets destroyed before program_cache does, so the time when program's dtor are called the...
> I just tried, using static pointer to context does not solves this problem. Maybe I'll open another ticket if I can repro the issue with minimum example. I think...
> So let's use static object (as before) instead and allow user to attach command queue. I'll hear how you weigh in on atomic and shared_mutex. You're right for a...
> I think the behaviour should be: setting a default device/context should be a one time action while setting a queue can be done multiple times, as long as the...
Nice. What happens if someone asked for default device and then want to set default queue?
In OpenCL every3 is identical in size, alignment and behavior to cl_4, so basically we only need to add `typedef 4_ 3_`.
>Add `float3_` type My conclusion: We cannot do it before Khronos changes OpenCL headers, so `cl_float3` is not a simple alias of `cl_float4` (`typedef`), but a separate struct.