Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | bolt::cl::gather (::bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 input_first, OutputIterator result, const std::string &user_code="") |
This version of gather copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ]. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | bolt::cl::gather (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 input_first, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | bolt::cl::gather_if (bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input_first, OutputIterator result, const std::string &user_code="") |
This version of gather_if copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather_if copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ] if stencil[ i - map_first ] is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | bolt::cl::gather_if (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input_first, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | bolt::cl::gather_if (bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input, OutputIterator result, Predicate pred, const std::string &user_code="") |
This version of gather_if copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather_if copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ] if pred (stencil[ i - map_first ]) is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | bolt::cl::gather_if (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input, OutputIterator result, Predicate pred, const std::string &user_code="") |
void bolt::cl::gather | ( | ::bolt::cl::control & | ctl, |
InputIterator1 | map_first, | ||
InputIterator1 | map_last, | ||
InputIterator2 | input_first, | ||
OutputIterator | result, | ||
const std::string & | user_code = "" |
||
) |
This version of gather
copies elements from a source array to a destination range according to a specified map. For each i
in InputIterator1
in the range [map_first, map_last), gather copies the corresponding
input_first
[ map [ i ] ] to result[ i - map_first ].
gather
APIs copy elements from a source array to a destination range (conditionally) according to a specified map. For common code between the host and device, one can take a look at the ClCode and TypeName implementations. See Bolt Tools for Split-Source for a detailed description.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::cl::control. |
map_first | The beginning of map sequence. |
map_last | The end of map sequence. |
input | The beginning of the source sequence. |
result | The beginning of the output 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. |
InputIterator1 | is a model of InputIterator |
InputIterator2 | is a model of InputIterator |
OutputIterator | is a model of OutputIterator |
The following code snippet demonstrates how to use gather
void bolt::cl::gather_if | ( | bolt::cl::control & | ctl, |
InputIterator1 | map_first, | ||
InputIterator1 | map_last, | ||
InputIterator2 | stencil, | ||
InputIterator3 | input_first, | ||
OutputIterator | result, | ||
const std::string & | user_code = "" |
||
) |
This version of gather_if
copies elements from a source array to a destination range according to a specified map. For each i
in InputIterator1
in the range [map_first, map_last), gather_if copies the corresponding
input_first
[ map [ i ] ] to result[ i - map_first ] if stencil[ i - map_first ] is true
.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::cl::control. |
map_first | The beginning of map sequence. |
map_last | The end of map sequence. |
stencil | The beginning of the stencil sequence. |
input | The beginning of the source sequence. |
result | The beginning of the output 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. |
InputIterator1 | is a model of InputIterator |
InputIterator2 | is a model of InputIterator |
InputIterator3 | is a model of InputIterator |
OutputIterator | is a model of OutputIterator |
The following code snippet demonstrates how to use gather_if
void bolt::cl::gather_if | ( | bolt::cl::control & | ctl, |
InputIterator1 | map_first, | ||
InputIterator1 | map_last, | ||
InputIterator2 | stencil, | ||
InputIterator3 | input, | ||
OutputIterator | result, | ||
Predicate | pred, | ||
const std::string & | user_code = "" |
||
) |
This version of gather_if
copies elements from a source array to a destination range according to a specified map. For each i
in InputIterator1
in the range [map_first, map_last), gather_if copies the corresponding
input_first
[ map [ i ] ] to result[ i - map_first ] if pred (stencil[ i - map_first ]) is true
.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::cl::control. |
map_first | The beginning of map sequence. |
map_last | The end of map sequence. |
stencil | The beginning of the stencil sequence. |
input | The beginning of the source sequence. |
result | The beginning of the output sequence. |
pred | A predicate for stencil. |
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. |
InputIterator1 | is a model of InputIterator |
InputIterator2 | is a model of InputIterator |
InputIterator3 | is a model of InputIterator |
OutputIterator | is a model of OutputIterator |
Predicate | is a model of Predicate |
The following code snippet demonstrates how to use gather_if