PrevUpHomeNext

Function accumulate

boost::compute::accumulate

Synopsis

// In header: <boost/compute/algorithm/accumulate.hpp>


template<typename InputIterator, typename T, typename BinaryFunction> 
  T accumulate(InputIterator first, InputIterator last, T init, 
               BinaryFunction function, 
               command_queue & queue = system::default_queue());
template<typename InputIterator, typename T> 
  T accumulate(InputIterator first, InputIterator last, T init, 
               command_queue & queue = system::default_queue());

Description

Returns the result of applying function to the elements in the range [first, last) and init.

If no function is specified, plus will be used.

See Also:

reduce()


PrevUpHomeNext