pstade

PrevUpHomeNext

Parallel Algorithms

parallel_copy
parallel_equals
parallel_for_each
parallel_reduce
parallel_sort

Pending section...

Description
Header
  • <pstade/oven/parallel_copy.hpp>
Model of
Valid expressions

Valid expression

Semantics

parallel_copy(s, _fwdrng, it)

copy(_fwdrng, it)

Preconditions
  • _iter_of<_fwdrng>::type and _typeof(it) are Parallel Safe.
  • s is a grainsize which is convertible to boost::range_difference<_typeof(_fwdrng)>::type.
  • it is a ForwardWritable Iterator.
  • The corresponding semantics is a valid expression.
Example
Description
Header
  • <pstade/oven/parallel_equals.hpp>
Model of
Valid expressions

Valid expression

Semantics

parallel_equals(s, _fwdrng1, _fwdrng2, _prd)

equals(_fwdrng1, _fwdrng2, _prd)

parallel_equals(s, _fwdrng1, _fwdrng2)

equals(_fwdrng1, _fwdrng2)

Preconditions
  • _iter_of<_fwdrng1>::type, _iter_of<_fwdrng2>::type and _prd are Parallel Safe.
  • s is a grainsize which is convertible to boost::range_difference<_typeof(_fwdrng1)>::type.
  • The corresponding semantics is a valid expression.
Example
Description
Header
  • <pstade/oven/parallel_for_each.hpp>
Model of
Valid expressions

Valid expression

Semantics

parallel_for_each(s, _fwdrng, _fun)

for_each(_fwdrng, _fun) but returns void.

Preconditions
  • _iter_of<_fwdrng>::type and _fun are Parallel Safe.
  • s is a grainsize which is convertible to boost::range_difference<_typeof(_fwdrng)>::type.
  • The corresponding semantics is a valid expression.
Example
Description
Header
  • <pstade/oven/parallel_reduce.hpp>
Model of
Notation
  • V is _value_of<_typeof(_fwdrng)>::type.
Valid expressions

Valid expression

Semantics

parallel_reduce(s, _fwdrng, _fun)

std::accumulate(boost::next(_begin(_fwdrng)), _end(_fwdrng), V(*_begin(_fwdrng)), _fun)

parallel_reduce(s, _fwdrng, z, _fun)

std::accumulate(_begin(_fwdrng), _end(_fwdrng), V(z), _fun)

Preconditions
  • _iter_of<_fwdrng>::type and _fun are Parallel Safe.
  • s is a grainsize which is convertible to boost::range_difference<_typeof(_fwdrng)>::type.
  • !boost::empty(_fwdrng) in the case of the first expression.
  • The corresponding semantics is a valid expression.
  • _fun is associative.
Example
Description
Header
  • <pstade/oven/parallel_sort.hpp>
Model of
Valid expressions

Valid expression

Semantics

parallel_sort(s, _rndrng, _fun)

sort(_rndrng, _fun)

parallel_sort(s, _rndrng)

sort(_rndrng)

Preconditions
  • _iter_of<_rndrng>::type and _fun are Parallel Safe.
  • s is a grainsize which is convertible to boost::range_difference<_typeof(_rndrng)>::type.
  • The corresponding semantics is a valid expression.
Example
Copyright 2005 -2007 Shunsuke Sogame

PrevUpHomeNext