GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
Classes | Public Member Functions | List of all members
grppi::dynamic_execution Class Reference

#include <dynamic_execution.h>

Public Member Functions

 dynamic_execution () noexcept
 
template<typename E >
 dynamic_execution (const E &e)
 
bool has_execution () const
 
template<typename... InputIterators, typename OutputIterator , typename Transformer >
void map (std::tuple< InputIterators... > firsts, OutputIterator first_out, std::size_t sequence_size, Transformer &&transform_op) const
 Applies a trasnformation to multiple sequences leaving the result in another sequence. More...
 
template<typename InputIterator , typename Identity , typename Combiner >
auto reduce (InputIterator first, std::size_t sequence_size, Identity &&identity, Combiner &&combine_op) const
 Applies a reduction to a sequence of data items. More...
 
template<typename... InputIterators, typename Identity , typename Transformer , typename Combiner >
auto map_reduce (std::tuple< InputIterators... > firsts, std::size_t sequence_size, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op) const
 Applies a map/reduce operation to a sequence of data items. More...
 
template<typename... InputIterators, typename OutputIterator , typename StencilTransformer , typename Neighbourhood >
void stencil (std::tuple< InputIterators... > firsts, OutputIterator first_out, std::size_t sequence_size, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op) const
 Applies a stencil to multiple sequences leaving the result in another sequence. More...
 
template<typename Input , typename Divider , typename Solver , typename Combiner >
auto divide_conquer (Input &&input, Divider &&divide_op, Solver &&solve_op, Combiner &&combine_op) const
 Invoke Divide/conquer pattern. More...
 
template<typename Input , typename Divider , typename Predicate , typename Solver , typename Combiner >
auto divide_conquer (Input &&input, Divider &&divide_op, Predicate &&predicate_op, Solver &&solve_op, Combiner &&combine_op) const
 Invoke Divide/conquer pattern. More...
 
template<typename Generator , typename... Transformers>
void pipeline (Generator &&generate_op, Transformers &&...transform_ops) const
 Invoke Pipeline pattern. More...
 

Constructor & Destructor Documentation

grppi::dynamic_execution::dynamic_execution ( )
inlinenoexcept
template<typename E >
grppi::dynamic_execution::dynamic_execution ( const E &  e)
inline

Member Function Documentation

template<typename Input , typename Divider , typename Solver , typename Combiner >
auto grppi::dynamic_execution::divide_conquer ( Input &&  input,
Divider &&  divide_op,
Solver &&  solve_op,
Combiner &&  combine_op 
) const

Invoke Divide/conquer pattern.

Template Parameters
InputType used for the input problem.
DividerCallable type for the divider operation.
SolverCallable type for the solver operation.
CombinerCallable type for the combiner operation.
Parameters
exSequential execution policy object.
inputInput problem to be solved.
divider_opDivider operation.
solver_opSolver operation.
combine_opCombiner operation.
template<typename Input , typename Divider , typename Predicate , typename Solver , typename Combiner >
auto grppi::dynamic_execution::divide_conquer ( Input &&  input,
Divider &&  divide_op,
Predicate &&  predicate_op,
Solver &&  solve_op,
Combiner &&  combine_op 
) const

Invoke Divide/conquer pattern.

Template Parameters
InputType used for the input problem.
DividerCallable type for the divider operation.
PredicateCallable type for the stop condition predicate.
SolverCallable type for the solver operation.
CombinerCallable type for the combiner operation.
Parameters
exSequential execution policy object.
inputInput problem to be solved.
divider_opDivider operation.
predicate_opPredicate operation.
solver_opSolver operation.
combine_opCombiner operation.
bool grppi::dynamic_execution::has_execution ( ) const
inline
template<typename... InputIterators, typename OutputIterator , typename Transformer >
void grppi::dynamic_execution::map ( std::tuple< InputIterators... >  firsts,
OutputIterator  first_out,
std::size_t  sequence_size,
Transformer &&  transform_op 
) const

Applies a trasnformation to multiple sequences leaving the result in another sequence.

Template Parameters
InputIteratorsIterator types for input sequences.
OutputIteratorIterator type for the output sequence.
TransformerCallable object type for the transformation.
Parameters
firstsTuple of iterators to input sequences.
first_outIterator to the output sequence.
sequence_sizeSize of the input sequences.
transform_opTransformation callable object.
Precondition
For every I iterators in the range [get<I>(firsts), next(get<I>(firsts),sequence_size)) are valid.
Iterators in the range [first_out, next(first_out,sequence_size)] are valid.
template<typename... InputIterators, typename Identity , typename Transformer , typename Combiner >
auto grppi::dynamic_execution::map_reduce ( std::tuple< InputIterators... >  firsts,
std::size_t  sequence_size,
Identity &&  identity,
Transformer &&  transform_op,
Combiner &&  combine_op 
) const

Applies a map/reduce operation to a sequence of data items.

Template Parameters
InputIteratorIterator type for the input sequence.
IdentityType for the identity value.
TransformerCallable object type for the transformation.
CombinerCallable object type for the combination.
Parameters
firstIterator to the first element of the sequence.
sequence_sizeSize of the input sequence.
identityIdentity value for the reduction.
transform_opTransformation callable object.
combine_opCombination callable object.
Precondition
Iterators in the range [first,last) are valid.
Returns
The map/reduce result.
template<typename Generator , typename... Transformers>
void grppi::dynamic_execution::pipeline ( Generator &&  generate_op,
Transformers &&...  transform_ops 
) const

Invoke Pipeline pattern.

Template Parameters
GeneratorCallable type for the generator operation.
TransformersCallable types for the transformers in the pipeline.
Parameters
generate_opGenerator operation.
transform_opsTransformer operations.
template<typename InputIterator , typename Identity , typename Combiner >
auto grppi::dynamic_execution::reduce ( InputIterator  first,
std::size_t  sequence_size,
Identity &&  identity,
Combiner &&  combine_op 
) const

Applies a reduction to a sequence of data items.

Template Parameters
InputIteratorIterator type for the input sequence.
IdentityType for the identity value.
CombinerCallable object type for the combination.
Parameters
firstIterator to the first element of the sequence.
sequence_sizeSize of the input sequence.
lastIterator to one past the end of the sequence.
identityIdentity value for the reduction.
combine_opCombination callable object.
Precondition
Iterators in the range [first,last) are valid.
Returns
The reduction result
template<typename... InputIterators, typename OutputIterator , typename StencilTransformer , typename Neighbourhood >
void grppi::dynamic_execution::stencil ( std::tuple< InputIterators... >  firsts,
OutputIterator  first_out,
std::size_t  sequence_size,
StencilTransformer &&  transform_op,
Neighbourhood &&  neighbour_op 
) const

Applies a stencil to multiple sequences leaving the result in another sequence.

Template Parameters
InputIteratorsIterator types for input sequences.
OutputIteratorIterator type for the output sequence.
StencilTransformerCallable object type for the stencil transformation.
NeighbourhoodCallable object for generating neighbourhoods.
Parameters
firstsTuple of iterators to input sequences.
first_outIterator to the output sequence.
sequence_sizeSize of the input sequences.
transform_opStencil transformation callable object.
neighbour_opNeighbourhood callable object.
Precondition
For every I iterators in the range [get<I>(firsts), next(get<I>(firsts),sequence_size)) are valid.
Iterators in the range [first_out, next(first_out,sequence_size)] are valid.

The documentation for this class was generated from the following file: