Bolt  1.1
C++ template library with support for OpenCL
Namespaces | Classes | Functions | Variables
bolt Namespace Reference

Defining namespace for the Bolt project. More...

Namespaces

namespace  amp
 Namespace containing AMP related data types and functions.
 
namespace  cl
 Namespace containing OpenCL related data types and functions.
 

Classes

class  ArrayPool
 
class  synchronized_view
 

Functions

template<typename IterType , typename Function >
void parallel_iteration (concurrency::extent< 1 > ext, IterType Init, Function f)
 
template<typename IterType , typename Function >
void parallel_iteration_1 (concurrency::extent< 1 > ext, IterType Init, Function f)
 
template<typename InputIterator , typename OutputIterator , typename BinaryFunction >
OutputIterator inclusive_scan (const concurrency::accelerator_view &av, InputIterator first, InputIterator last, OutputIterator result, BinaryFunction binary_op)
 
template<typename InputIterator , typename OutputIterator , typename BinaryFunction >
OutputIterator inclusive_scan (InputIterator begin, InputIterator end, OutputIterator result, BinaryFunction binary_op, std::input_iterator_tag)
 
template<typename InputIterator , typename OutputIterator , typename BinaryFunction >
OutputIterator inclusive_scan (InputIterator first, InputIterator last, OutputIterator result, BinaryFunction binary_op)
 
template<typename InputIterator , typename OutputIterator >
OutputIterator inclusive_scan (InputIterator first, InputIterator last, OutputIterator result)
 

Variables

const int scanMultiCpuThreshold = 4
 
const int scanGpuThreshold = 8
 
const int maxThreadsInTile = 1024
 
const int maxTilesPerDim = 65535
 
const int maxTilesPerPFE = maxThreadsInTile*maxTilesPerDim
 

Detailed Description

Defining namespace for the Bolt project.

Function Documentation

template<typename IterType , typename Function >
void bolt::parallel_iteration ( concurrency::extent< 1 >  ext,
IterType  Init,
Function  f 
)

parallel_iteration1 : Slow implementation - just use a parallel_for for all devices.

Init is the initial state for the Iteration type for every index.

The user provides a functor that accepts two arguments: index<> - location in the extent to be processed. IterType : User-supplied type that tracks the state of each iteration. The functor is responsible for : Updating the state so that it points to the next 'iteration'. The next "iteration" could be the next cascade stage in a face-detection algorithm, or the next iteration of a loop. It is very important to update to the next state to avoid an infinite loop. Returns true if the Bolt runtime is to schedule the next iteration, or false if the runtime is to exit.