Bolt  1.3
C++ template library with support for OpenCL
Namespaces | Functions
reduce_by_key.h File Reference

Performs on a sequence, a reduction of each sub-sequence as defined by equivalent keys. More...

#include <bolt/amp/bolt.h>
#include <bolt/amp/pair.h>
#include "bolt/amp/scan.h"
#include <bolt/amp/detail/reduce_by_key.inl>

Go to the source code of this file.

Namespaces

namespace  bolt
 Defining namespace for the Bolt project.
 
namespace  bolt::amp
 Namespace containing AMP related data types and functions.
 

Functions

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output)
 reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(), and the BinaryPredicate is equal_to().
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred)
 reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(). reduce_by_key is a generalization of reduce to key-value pairs. If the reduction operator is not commutative then bolt::reduce_by_key should not be used.
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate , typename BinaryFunction >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, BinaryFunction binary_op)
 reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; reduce_by_key is a generalization of reduce to key-value pairs. If the reduction operator is not commutative then bolt::reduce_by_key should not be used.
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate , typename BinaryFunction >
bolt::amp::pair
< OutputIterator1,
OutputIterator2 > 
bolt::amp::reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, BinaryFunction binary_op)
 

Detailed Description

Performs on a sequence, a reduction of each sub-sequence as defined by equivalent keys.