|
Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
| template<typename ForwardIterator , typename T > | |
| void | bolt::cl::fill (const bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
Fill assigns the value of value to each element in the range [first,last]. | |
| template<typename ForwardIterator , typename T > | |
| void | bolt::cl::fill (ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
| template<typename OutputIterator , typename Size , typename T > | |
| OutputIterator | bolt::cl::fill_n (const bolt::cl::control &ctl, OutputIterator first, Size n, const T &value, const std::string &cl_code="") |
fill_n assigns the value value to every element in the range [first,first+n]. The return value is first + n. | |
| template<typename OutputIterator , typename Size , typename T > | |
| OutputIterator | bolt::cl::fill_n (OutputIterator first, Size n, const T &value, const std::string &cl_code="") |
| void bolt::cl::fill | ( | const bolt::cl::control & | ctl, |
| ForwardIterator | first, | ||
| ForwardIterator | last, | ||
| const T & | value, | ||
| const std::string & | cl_code = "" |
||
| ) |
Fill assigns the value of value to each element in the range [first,last].
| ctl | Optional control structure to control command-queue, debug, tuning, etc. See bolt::cl::control. |
| first | The first element in the range of interest. |
| last | The last element in the range of interest. |
| value | Sets this value to elements in the range [first,last]. |
| cl_code | Optional OpenCL(TM) code to be prepended to any OpenCL kernels used by this function. |
| ForwardIterator | is a model of Forward Iterator, and InputIterator is mutable. |
| T | is a model of Assignable. |
The following code snippet demonstrates how to fill a device_vector with a float value.
| OutputIterator bolt::cl::fill_n | ( | const bolt::cl::control & | ctl, |
| OutputIterator | first, | ||
| Size | n, | ||
| const T & | value, | ||
| const std::string & | cl_code = "" |
||
| ) |
fill_n assigns the value value to every element in the range [first,first+n]. The return value is first + n.
| ctl | Optional control structure to control command-queue, debug, tuning, etc. See bolt::cl::control. |
| first | The first element in the range of interest. |
| n | The size of the range of interest. |
| value | Sets this value to elements in the range [first,first+n]. |
| cl_code | Optional OpenCL(TM) code to be prepended to any OpenCL kernels used by this function. |
| OutputIterator | is a model of Output Iterator |
| Size | is an integral type (either signed or unsigned). |
| T | is a model of Assignable |
The following code snippet demonstrates how to fill a device_vector with a float value.
1.8.3