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

Inner Product returns the inner product of two iterators. More...

#include <bolt/amp/bolt.h>
#include <bolt/amp/device_vector.h>
#include <string>
#include <iostream>
#include <bolt/amp/detail/inner_product.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 InputIterator , typename OutputType >
OutputType bolt::amp::inner_product (bolt::amp::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init)
 Inner Product returns the inner product of two iterators. This is similar to calculating binary transform and then reducing the result. The inner_product operation is similar the std::inner_product function. This function can take optional control structure to control command-queue.
 
template<typename InputIterator , typename OutputType >
OutputType bolt::amp::inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init)
 
template<typename InputIterator , typename OutputType , typename BinaryFunction1 , typename BinaryFunction2 >
OutputType bolt::amp::inner_product (bolt::amp::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2)
 Inner Product returns the inner product of two iterators using user specified binary functors f1 and f2. This is similar to calculating transform and then reducing the result. The functor f1 should be commutative. This function can take optional control structure to control command-queue. The inner_product operation is similar the std::inner_product function.
 
template<typename InputIterator , typename OutputType , typename BinaryFunction1 , typename BinaryFunction2 >
OutputType bolt::amp::inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2)
 

Detailed Description

Inner Product returns the inner product of two iterators.