|
Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
| template<typename ForwardIterator , typename Generator > | |
| void | bolt::cl::generate (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, Generator gen, const std::string &cl_code="") |
generate assigns to each element of a sequence [first,last] the value returned by gen. | |
| template<typename ForwardIterator , typename Generator > | |
| void | bolt::cl::generate (ForwardIterator first, ForwardIterator last, Generator gen, const std::string &cl_code="") |
| template<typename OutputIterator , typename Size , typename Generator > | |
| OutputIterator | bolt::cl::generate_n (bolt::cl::control &ctl, OutputIterator first, Size n, Generator gen, const std::string &cl_code="") |
generate_n assigns to each element of a sequence [first,first+n] the value returned by gen. | |
| template<typename OutputIterator , typename Size , typename Generator > | |
| OutputIterator | bolt::cl::generate_n (OutputIterator first, Size n, Generator gen, const std::string &cl_code="") |
| void bolt::cl::generate | ( | bolt::cl::control & | ctl, |
| ForwardIterator | first, | ||
| ForwardIterator | last, | ||
| Generator | gen, | ||
| const std::string & | cl_code = "" |
||
| ) |
generate assigns to each element of a sequence [first,last] the value returned by gen.
| ctl | Optional control structure to control command-queue, debug, tuning, etc. See bolt::cl::control. |
| first | The first element of the sequence. |
| last | The last element of the sequence. |
| gen | A generator, functor taking no parameters. |
| 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 ForwardIterator is mutable. |
| Generator | is a model of Generator, and Generator's result_type is convertible to ForwardIterator's value_type. |
The following code snippet demonstrates how to fill a vector with a constant number.
| OutputIterator bolt::cl::generate_n | ( | bolt::cl::control & | ctl, |
| OutputIterator | first, | ||
| Size | n, | ||
| Generator | gen, | ||
| const std::string & | cl_code = "" |
||
| ) |
generate_n assigns to each element of a sequence [first,first+n] the value returned by gen.
| ctl | Optional control structure to control command-queue, debug, tuning, etc. See bolt::cl::control. |
| first | The first element of the sequence. |
| n | The number of sequence elements to generate. |
| gen | A generator, functor taking no parameters. |
| 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. |
| Generator | is a model of Generator, and Generator's result_type is convertible to OutputIterator's value_type. |
The following code snippet demonstrates how to fill a vector with a constant number.
1.8.3