Bolt
1.1
C++ template library with support for OpenCL
|
Inner Product returns the inner product of two iterators. More...
#include <bolt/cl/bolt.h>
#include <bolt/cl/device_vector.h>
#include <string>
#include <iostream>
#include <bolt/cl/detail/inner_product.inl>
Go to the source code of this file.
Namespaces | |
namespace | bolt |
Defining namespace for the Bolt project. | |
namespace | bolt::cl |
Namespace containing OpenCL related data types and functions. | |
Functions | |
template<typename InputIterator , typename OutputType > | |
OutputType | bolt::cl::inner_product (bolt::cl::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, const std::string &cl_code="") |
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::cl::inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, const std::string &cl_code="") |
template<typename InputIterator , typename OutputType , typename BinaryFunction1 , typename BinaryFunction2 > | |
OutputType | bolt::cl::inner_product (bolt::cl::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2, const std::string &cl_code="") |
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::cl::inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2, const std::string &cl_code="") |
Inner Product returns the inner product of two iterators.