Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit adcd4c09f0.
PrevUpHomeNext

Function template inner_product

boost::compute::inner_product

Synopsis

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


template<typename InputIterator1, typename InputIterator2, typename T> 
  T inner_product(InputIterator1 first1, InputIterator1 last1, 
                  InputIterator2 first2, T init, 
                  command_queue & queue = system::default_queue());

Description

Returns the inner product of the elements in the range [first1, last1) with the elements in the range beginning at first2.

Space complexity: \Omega(1)
Space complexity when binary operator is recognized as associative: \Omega(n)


PrevUpHomeNext