...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::fill
// In header: <boost/compute/algorithm/fill.hpp> template<typename BufferIterator, typename T> void fill(BufferIterator first, BufferIterator last, const T & value, command_queue & queue = system::default_queue());
Fills the range [first
, last
) with value
.
For example, to fill a vector on the device with sevens:
// vector on the device boost::compute::vector<int> vec(10, context); // fill vector with sevens boost::compute::fill(vec.begin(), vec.end(), 7, queue);
Space complexity: \Omega(1)
See Also:
boost::compute::fill_n()
Parameters: |
|