Bugzilla – Bug 490
C++ Binding Enhancements
Last modified: 2011-08-30 13:09:28 PDT
Currently there are several member functions that take a vector of devices. For example:
Context(const VECTOR_CLASS<Device>& devices, ...)
To use the above constructor with a single device, it is first necessary to make a vector containing the single device. I'd like to suggest adding matching functions that take a single device (where this makes sense), thereby avoiding the construction of a temporary vector in client code.
So using the above example, add the constructor
Context(const Device& device, ...)
Client code can then change from
cl::Context context(std::vector<cl::Device>(1, device));
I've added support for this request. This is tied in with some new work on default s that will appear in new version of cl.hpp that will be published in September 2011.