Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | bolt::amp::scatter (::bolt::amp::control &ctl, InputIterator1 first, InputIterator1 last, InputIterator2 map, OutputIterator result) |
This version of scatter copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter copies the corresponding input_first to result[ map [ i ] ]. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | bolt::amp::scatter (InputIterator1 first, InputIterator1 last1, InputIterator2 map, OutputIterator result) |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | bolt::amp::scatter_if (bolt::amp::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result) |
This version of scatter_if copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter_if copies the corresponding input_first to result[ map [ i ] ] if stencil[ i - first ] is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | bolt::amp::scatter_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result) |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | bolt::amp::scatter_if (bolt::amp::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, Predicate pred) |
This version of scatter_if copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter_if copies the corresponding input_first to result[ map [ i ] ] if pred (stencil[ i - first ]) is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | bolt::amp::scatter_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, Predicate pred) |
void bolt::amp::scatter | ( | ::bolt::amp::control & | ctl, |
InputIterator1 | first, | ||
InputIterator1 | last, | ||
InputIterator2 | map, | ||
OutputIterator | result | ||
) |
This version of scatter
copies elements from a source range to a destination array according to a specified map. For each i
in InputIterator1
in the range [first, last), scatter copies the corresponding
input_first
to result[ map [ i ] ].
scatter
APIs copy elements from a source range to a destination array (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::amp::control. |
first | The beginning of input sequence. |
last | The end of input sequence. |
map | The beginning of the source sequence. |
result | The beginning of the output sequence. |
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 scatter
void bolt::amp::scatter_if | ( | bolt::amp::control & | ctl, |
InputIterator1 | first1, | ||
InputIterator1 | last1, | ||
InputIterator2 | map, | ||
InputIterator3 | stencil, | ||
OutputIterator | result | ||
) |
This version of scatter_if
copies elements from a source range to a destination array according to a specified map. For each i
in InputIterator1
in the range [first, last), scatter_if copies the corresponding
input_first
to result[ map [ i ] ] if stencil[ i - first ] is true
.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::amp::control. |
first | The beginning of input sequence. |
last | The end of input sequence. |
map | The beginning of the map sequence. |
stencil | The beginning of the stencil sequence. |
result | The beginning of the output sequence. |
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 scatter_if
void bolt::amp::scatter_if | ( | bolt::amp::control & | ctl, |
InputIterator1 | first1, | ||
InputIterator1 | last1, | ||
InputIterator2 | map, | ||
InputIterator3 | stencil, | ||
OutputIterator | result, | ||
Predicate | pred | ||
) |
This version of scatter_if
copies elements from a source range to a destination array according to a specified map. For each i
in InputIterator1
in the range [first, last), scatter_if copies the corresponding
input_first
to result[ map [ i ] ] if pred (stencil[ i - first ]) is true
.
ctl | Optional Control structure to control command-queue, debug, tuning, etc.See bolt::amp::control. |
first | The beginning of input sequence. |
last | The end of input sequence. |
map | The beginning of the map sequence. |
stencil | The beginning of the stencil sequence. |
result | The beginning of the output sequence. |
pred | A predicate for stencil. |
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 scatter_if