Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | bolt::cl::copy (const bolt::cl::control &ctl, InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | bolt::cl::copy (InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename Size , typename OutputIterator > | |
OutputIterator | bolt::cl::copy_n (const bolt::cl::control &ctl, InputIterator first, Size n, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename Size , typename OutputIterator > | |
OutputIterator | bolt::cl::copy_n (InputIterator first, Size n, OutputIterator result, const std::string &user_code="") |
OutputIterator bolt::cl::copy | ( | const bolt::cl::control & | ctl, |
InputIterator | first, | ||
InputIterator | last, | ||
OutputIterator | result, | ||
const std::string & | user_code = "" |
||
) |
copy copies each element from the sequence [first, last) to [result, result + (last - first)), i.e., it assigns *result = *first, then *(result + 1) = *(first + 1), and so on.
Calling copy with overlapping source and destination ranges has undefined behavior, as the order of copying on the GPU is not guaranteed.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::cl::control. |
first | Beginning of the source copy sequence. |
last | End of the source copy sequence. |
result | Beginning of the destination sequence. |
user_code | Optional OpenCL(TM) code to be prepended to any OpenCL kernels used by this function. |
InputIterator | is a model of InputIterator and InputIterator's value_type must be convertible to OutputIterator's value_type . |
OutputIterator | is a model of OutputIterator |
The following demonstrates how to use copy
.
OutputIterator bolt::cl::copy_n | ( | const bolt::cl::control & | ctl, |
InputIterator | first, | ||
Size | n, | ||
OutputIterator | result, | ||
const std::string & | user_code = "" |
||
) |
copy_n copies each element from the sequence [first, first+n) to [result, result + n), i.e., it assigns *result = *first, then *(result + 1) = *(first + 1), and so on.
Calling copy_n with overlapping source and destination ranges has undefined behavior, as the order of copying on the GPU is not guaranteed.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::cl::control. |
first | Beginning of the source copy sequence. |
n | Number of elements to copy. |
result | Beginning of the destination sequence. |
user_code | Optional OpenCL™ code to be passed to the OpenCL compiler. The cl_code is inserted first in the generated code, before the cl_code trait. |
InputIterator | is a model of InputIterator and InputIterator's value_type must be convertible to OutputIterator's value_type . |
Size | is an integral type. |
OutputIterator | is a model of OutputIterator |
The following demonstrates how to use copy
.