GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
grppi Namespace Reference

Namespaces

 detail_ff
 
 internal
 

Classes

class  context_t
 Representation of a context pattern. Represents a context that uses a given policy to run a transformer. This pattern is intended to switch between execution policies in a pattern composition. More...
 
class  dynamic_execution
 
class  farm_info
 
class  farm_t
 Representation of farm pattern. Represents a farm of n replicas from a transformer. More...
 
class  filter_info
 
class  filter_t
 Representation of filter pattern. Represents a filter that can be used as a stage on a pipeline. More...
 
class  iteration_t
 Representation of iteration pattern. Represents a iteration that can be used as a stage on a pipeline. More...
 
class  mpmc_queue
 
class  native_thread_manager
 RAII class to manage registration/deregistration pairs. This class allows to manage automatic deregistration of threads through the common RAII pattern. The current thread is registered into the registry at construction and deregistered a destruction. More...
 
struct  parallel_execution_ff
 
class  parallel_execution_native
 Native parallel execution policy. This policy uses ISO C++ threads as implementation building block allowing usage in any ISO C++ compliant platform. More...
 
class  parallel_execution_omp
 OpenMP parallel execution policy. More...
 
class  parallel_execution_tbb
 TBB parallel execution policy. More...
 
class  pipeline_info
 
class  pipeline_t
 Representation of pipeline pattern. Represents a pipeline with multiple chained transformers. More...
 
class  reduce_t
 Representation of reduce pattern. Represents a reduction that can be used as a stage on a pipeline. More...
 
class  reduction_info
 
class  sequential_execution
 Sequential execution policy. More...
 
struct  stage_return_type
 Determines the return type after appliying a list of transformers (stages) on a input type. More...
 
struct  stage_return_type< Input, Transformer >
 Determines the return type of appliying a function on a input type. More...
 
struct  stage_return_type< Input, Transformer, Other... >
 Determines the return type of consecutively appliying a set of transformer functions on a input type. More...
 
class  thread_registry
 Thread index table to provide portable natural thread indices. More...
 
class  worker_pool
 Pool of worker threads. This class offers a simple pool of worker threads. More...
 

Typedefs

template<typename G >
using requires_generator = typename std::enable_if_t< is_generator< G >, int >
 
template<typename F >
using requires_arguments = typename std::enable_if_t< internal::has_arguments< F >(), int >
 
template<typename F , typename I >
using requires_consumer = typename std::enable_if_t< internal::has_void_return< F(I)>(), int >
 
template<typename T >
using requires_context = typename std::enable_if_t< is_context< T >, int >
 
template<typename E >
using requires_execution_supported = std::enable_if_t< is_supported< E >(), int >
 
template<typename E >
using requires_execution_not_supported = std::enable_if_t<!is_supported< E >(), int >
 
template<typename T >
using requires_farm = typename std::enable_if_t< is_farm< T >, int >
 
template<typename T >
using requires_filter = typename std::enable_if_t< is_filter< T >, int >
 
template<typename T >
using requires_iteration = typename std::enable_if_t< is_iteration< T >, int >
 
template<typename T >
using requires_iterator = std::enable_if_t< is_iterator< T >, int >
 
template<typename... T>
using requires_iterators = std::enable_if_t< are_iterators< T... >, int >
 
template<typename T >
using requires_queue = std::enable_if_t< is_queue< T >, int >
 
template<typename T >
using requires_no_pattern = std::enable_if_t< is_no_pattern< T >, int >
 
template<typename T >
using requires_pattern = std::enable_if_t< is_pattern< T >, int >
 
template<typename Input , typename Transformer >
using result_type = typename std::result_of< Transformer(Input)>::type
 Determines the return type of appliying a function on a input type. More...
 
template<typename T >
using requires_pipeline = typename std::enable_if_t< is_pipeline< T >, int >
 
template<typename I , typename T >
using output_value_type = typename internal::output_value_type< I, T >::type
 
template<typename T >
using requires_reduce = std::enable_if_t< is_reduce< T >, int >
 

Enumerations

enum  queue_mode { queue_mode::lockfree = true, queue_mode::blocking = false }
 

Functions

template<typename E >
constexpr bool is_supported ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<typename E >
constexpr bool supports_map ()
 Determines if an execution policy supports the map pattern. More...
 
template<typename E >
constexpr bool supports_reduce ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<typename E >
constexpr bool supports_map_reduce ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<typename E >
constexpr bool supports_stencil ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<typename E >
constexpr bool supports_divide_conquer ()
 Determines if an execution policy supports the divide-conquer pattern. More...
 
template<typename E >
constexpr bool supports_pipeline ()
 Determines if an execution policy supports the pipeline pattern. More...
 
template<typename F , typename... Iterators, template< typename... > class T>
decltype(auto) apply_deref_increment (F &&f, T< Iterators... > &iterators)
 Applies a callable object to the values obtained from the iterators in a tuple-like object. This function takes callable object f and a tuple-like with iterators (e.g. the result of make_tuple(it1, it2, it3)) More...
 
template<typename F , typename... Iterators, template< typename... > class T>
decltype(auto) apply_increment (F &&f, T< Iterators... > &iterators)
 Applies a callable object to the iterators in a tuple like-object and the increments those iterators. This function takes callable object f and a tuple-like object with iterators (e.g. the result of make_tuple(it1, it2, it3)) More...
 
template<typename F , typename T >
decltype(auto) apply_iterators_indexed (F &&f, T &&t, std::size_t i)
 Applies a callable object to the values obtained from the iterators in a tuple by indexing. This function takes callable object f, a tuple-like with iterators (e.g. the result of make_tuple(it1, it2, it3)) and an integral index i. More...
 
template<typename T >
auto iterators_next (T &&t, int n)
 Computes next n steps from a tuple of iterators. More...
 
template<typename... InputIt>
void advance_iterators (size_t delta, InputIt &...in)
 
template<typename... InputIt>
void advance_iterators (InputIt &...in)
 
template<typename ExecutionPolicy , typename Transformer >
auto run_with (ExecutionPolicy &ex, Transformer &&transform_op)
 Define a new Context on a data stream that can be composed in other streaming patterns. More...
 
template<typename Execution , typename Input , typename Divider , typename Solver , typename Combiner >
auto divide_conquer (const Execution &ex, Input &&input, Divider &&divider_op, Solver &&solver_op, Combiner &&combiner_op)
 Invoke Divide/conquer pattern. Execution Execution type. More...
 
template<typename Execution , typename Input , typename Divider , typename Predicate , typename Solver , typename Combiner >
auto divide_conquer (const Execution &ex, Input &&input, Divider &&divider_op, Predicate &&predicate_op, Solver &&solver_op, Combiner &&combiner_op)
 Invoke Divide/conquer pattern. Execution Execution type. More...
 
template<>
constexpr bool is_supported< dynamic_execution > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool supports_map< dynamic_execution > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool supports_reduce< dynamic_execution > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool supports_map_reduce< dynamic_execution > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool supports_stencil< dynamic_execution > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool supports_divide_conquer< dynamic_execution > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool supports_pipeline< dynamic_execution > ()
 Determines if an execution policy supports the pipeline pattern. More...
 
template<typename Transformer >
auto farm (int ntasks, Transformer &&transform_op)
 Invoke Farm pattern on a data stream that can be composed in other streaming patterns. More...
 
template<typename E >
constexpr bool is_parallel_execution_ff ()
 Metafunction that determines if type E is parallel_execution_ff This metafunction evaluates to false if GRPPI_FF is disabled. More...
 
template<typename Execution , typename... InputIterators, typename InputIt , typename OutputIt , typename Transformer , requires_iterators< InputIterators... > = 0, requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void map (const Execution &ex, std::tuple< InputIterators... > firsts, InputIt last, OutputIt first_out, Transformer transform_op)
 Invoke Map pattern on a data sequence. More...
 
template<typename Execution , typename... InputIterators, typename OutputIt , typename Transformer , requires_iterators< InputIterators... > = 0, requires_iterator< OutputIt > = 0>
void map (const Execution &ex, std::tuple< InputIterators... > firsts, std::size_t range, OutputIt first_out, Transformer transformer_op)
 Invoke Map pattern on a data sequence. More...
 
template<typename Execution , typename InputIt , typename OutputIt , typename Transformer , requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void map (const Execution &ex, InputIt first, InputIt last, OutputIt first_out, Transformer transform_op)
 Invoke Map pattern on a data sequence. More...
 
template<typename Execution , typename InputIt , typename OutputIt , typename Transformer , typename... OtherInputIts, requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void map (const Execution &ex, InputIt first, InputIt last, OutputIt first_out, Transformer transform_op, OtherInputIts...other_firsts)
 Invoke Map pattern on a data sequence. More...
 
template<typename Execution , typename... InputIterators, typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0>
auto map_reduce (const Execution &ex, std::tuple< InputIterators... > firsts, std::size_t size, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke Map/reduce pattern on a data sequence. More...
 
template<typename Execution , typename... InputIterators, typename InputIt , typename Identity , typename Transformer , typename Combiner , requires_iterators< InputIterators... > = 0, requires_iterator< InputIt > = 0>
auto map_reduce (const Execution &ex, std::tuple< InputIterators... > firsts, InputIt last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke Map/reduce pattern on a data sequence. More...
 
template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , requires_iterator< InputIterator > = 0>
auto map_reduce (const Execution &ex, InputIterator first, InputIterator last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op)
 Invoke Map/reduce pattern on a data sequence. More...
 
template<typename Execution , typename InputIterator , typename Identity , typename Transformer , typename Combiner , typename... OtherInputIterators, requires_iterator< InputIterator > = 0>
auto map_reduce (const Execution &ex, InputIterator first, InputIterator last, Identity &&identity, Transformer &&transform_op, Combiner &&combine_op, OtherInputIterators...other_firsts)
 Invoke Map/reduce pattern on multiple data sequences. More...
 
template<typename E >
constexpr bool is_parallel_execution_native ()
 Metafunction that determines if type E is parallel_execution_native. More...
 
template<>
constexpr bool is_supported< parallel_execution_native > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool supports_map< parallel_execution_native > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool supports_reduce< parallel_execution_native > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool supports_map_reduce< parallel_execution_native > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool supports_stencil< parallel_execution_native > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool supports_divide_conquer< parallel_execution_native > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool supports_pipeline< parallel_execution_native > ()
 Determines if an execution policy supports the pipeline pattern. More...
 
template<typename E >
constexpr bool is_parallel_execution_omp ()
 Metafunction that determines if type E is parallel_execution_omp. More...
 
template<>
constexpr bool is_supported< parallel_execution_omp > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool supports_map< parallel_execution_omp > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool supports_reduce< parallel_execution_omp > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool supports_map_reduce< parallel_execution_omp > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool supports_stencil< parallel_execution_omp > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool supports_divide_conquer< parallel_execution_omp > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool supports_pipeline< parallel_execution_omp > ()
 Determines if an execution policy supports the pipeline pattern. More...
 
template<typename Execution , typename Generator , typename... Transformers, requires_execution_supported< Execution > = 0>
void pipeline (const Execution &ex, Generator &&generate_op, Transformers &&...transform_ops)
 Invoke Pipeline pattern on a data stream. More...
 
template<typename Generator , typename... Transformers, typename Consumer >
auto pipeline (Generator &&generate_op, Transformers &&...transform_ops, Consumer &&consume_op)
 Build a composable Pipeline pattern representation that can be composed in other streaming patterns. More...
 
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0>
auto reduce (const Execution &ex, InputIt first, std::size_t size, Result &&identity, Combiner &&combine_op)
 Invoke Reduce pattern with identity value on a data sequence with sequential execution. More...
 
template<typename Execution , typename InputIt , typename Result , typename Combiner , requires_iterator< InputIt > = 0>
auto reduce (const Execution &ex, InputIt first, InputIt last, Result &&identity, Combiner &&combine_op)
 Invoke Reduce pattern with identity value on a data sequence with sequential execution. More...
 
template<typename E >
constexpr bool is_sequential_execution ()
 Determine if a type is a sequential execution policy. More...
 
template<>
constexpr bool is_supported< sequential_execution > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool supports_map< sequential_execution > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool supports_reduce< sequential_execution > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool supports_map_reduce< sequential_execution > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool supports_stencil< sequential_execution > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool supports_divide_conquer< sequential_execution > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool supports_pipeline< sequential_execution > ()
 Determines if an execution policy supports the pipeline pattern. More...
 
template<typename Execution , typename... InputIterators, typename OutputIt , typename StencilTransformer , typename Neighbourhood , requires_iterators< InputIterators... > = 0, requires_iterator< OutputIt > = 0>
void stencil (const Execution &ex, std::tuple< InputIterators... > firsts, std::size_t size, OutputIt out, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op)
 Invoke Stencil pattern on a data sequence with sequential execution. More...
 
template<typename Execution , typename... InputIterators, typename InputIt , typename OutputIt , typename StencilTransformer , typename Neighbourhood , requires_iterators< InputIterators... > = 0, requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void stencil (const Execution &ex, std::tuple< InputIterators... > firsts, InputIt last, OutputIt out, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op)
 Invoke Stencil pattern on a data sequence with sequential execution. More...
 
template<typename Execution , typename InputIt , typename OutputIt , typename StencilTransformer , typename Neighbourhood , requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void stencil (const Execution &ex, InputIt first, InputIt last, OutputIt out, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op)
 Invoke Stencil pattern on a data sequence with sequential execution. More...
 
template<typename Execution , typename InputIt , typename OutputIt , typename StencilTransformer , typename Neighbourhood , typename... OtherInputIts, requires_iterator< InputIt > = 0, requires_iterator< OutputIt > = 0>
void stencil (const Execution &ex, InputIt first, InputIt last, OutputIt out, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op, OtherInputIts...other_firsts)
 Invoke Stencil pattern on multiple data sequences with sequential execution. More...
 
template<typename Predicate >
auto keep (Predicate &&predicate_op)
 Invoke Filter pattern on a data stream that can be composed in other streaming patterns. This function keeps in the stream only those items that satisfy the predicate. More...
 
template<typename Predicate >
auto discard (Predicate &&predicate_op)
 Invoke Filter pattern on a data stream that can be composed in other streaming patterns. This function discards from the stream those items that satisfy the predicate. More...
 
template<typename Transformer , typename Predicate >
auto repeat_until (Transformer &&transform_op, Predicate &&predicate_op)
 
template<typename Identity , typename Combiner >
auto reduce (int window_size, int offset, Identity identity, Combiner &&combine_op)
 Invoke Stream reduction pattern on a stream that can be composed in other streaming patterns. More...
 
template<typename E >
constexpr bool is_parallel_execution_tbb ()
 Metafunction that determines if type E is parallel_execution_tbb. More...
 
template<>
constexpr bool is_supported< parallel_execution_tbb > ()
 Determines if an execution policy is supported in the current compilation. More...
 
template<>
constexpr bool supports_map< parallel_execution_tbb > ()
 Determines if an execution policy supports the map pattern. More...
 
template<>
constexpr bool supports_reduce< parallel_execution_tbb > ()
 Determines if an execution policy supports the reduce pattern. More...
 
template<>
constexpr bool supports_map_reduce< parallel_execution_tbb > ()
 Determines if an execution policy supports the map-reduce pattern. More...
 
template<>
constexpr bool supports_stencil< parallel_execution_tbb > ()
 Determines if an execution policy supports the stencil pattern. More...
 
template<>
constexpr bool supports_divide_conquer< parallel_execution_tbb > ()
 Determines if an execution policy supports the divide/conquer pattern. More...
 
template<>
constexpr bool supports_pipeline< parallel_execution_tbb > ()
 Determines if an execution policy supports the pipeline pattern. More...
 

Variables

template<typename F , typename I >
constexpr bool is_consumer = internal::has_void_return<F,I>()
 
template<typename G >
constexpr bool is_generator
 
template<typename T >
static constexpr bool is_context = internal::is_context<std::decay_t<T>>()
 
template<typename T >
static constexpr bool is_farm = internal::is_farm<std::decay_t<T>>()
 
template<typename T >
static constexpr bool is_filter = internal::is_filter<std::decay_t<T>>()
 
template<typename T >
static constexpr bool is_iteration = internal::is_iteration<std::decay_t<T>>()
 
template<typename T >
constexpr bool is_iterator = internal::is_iterator<T>::value
 
template<typename... T>
constexpr bool are_iterators = internal::are_iterators<T...>::value
 
template<typename T >
constexpr bool is_queue = internal::is_queue<T>()
 
template<typename T >
constexpr bool is_no_pattern
 
template<typename T >
constexpr bool is_pattern = !is_no_pattern<T>
 
template<typename T >
static constexpr bool is_pipeline = internal::is_pipeline<std::decay_t<T>>()
 
template<typename T >
constexpr bool is_reduce = internal::is_reduce<std::decay_t<T>>()
 

Detailed Description

Version
GrPPI v0.2

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You have received a copy of the GNU General Public License in LICENSE.txt also available in http://www.gnu.org/licenses/gpl.html.

See COPYRIGHT.txt for copyright notices and details.

Version
GrPPI v0.3

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You have received a copy of the GNU General Public License in LICENSE.txt also available in http://www.gnu.org/licenses/gpl.html.

See COPYRIGHT.txt for copyright notices and details.

Typedef Documentation

template<typename I , typename T >
using grppi::output_value_type = typedef typename internal::output_value_type<I,T>::type
template<typename F >
using grppi::requires_arguments = typedef typename std::enable_if_t<internal::has_arguments<F>(), int>
template<typename F , typename I >
using grppi::requires_consumer = typedef typename std::enable_if_t<internal::has_void_return<F(I)>(), int>
template<typename T >
using grppi::requires_context = typedef typename std::enable_if_t<is_context<T>, int>
template<typename E >
using grppi::requires_execution_not_supported = typedef std::enable_if_t<!is_supported<E>(), int>
template<typename E >
using grppi::requires_execution_supported = typedef std::enable_if_t<is_supported<E>(), int>
template<typename T >
using grppi::requires_farm = typedef typename std::enable_if_t<is_farm<T>, int>
template<typename T >
using grppi::requires_filter = typedef typename std::enable_if_t<is_filter<T>, int>
template<typename G >
using grppi::requires_generator = typedef typename std::enable_if_t<is_generator<G>, int>
template<typename T >
using grppi::requires_iteration = typedef typename std::enable_if_t<is_iteration<T>, int>
template<typename T >
using grppi::requires_iterator = typedef std::enable_if_t<is_iterator<T>, int>
template<typename... T>
using grppi::requires_iterators = typedef std::enable_if_t<are_iterators<T...>, int>
template<typename T >
using grppi::requires_no_pattern = typedef std::enable_if_t<is_no_pattern<T>,int>
template<typename T >
using grppi::requires_pattern = typedef std::enable_if_t<is_pattern<T>, int>
template<typename T >
using grppi::requires_pipeline = typedef typename std::enable_if_t<is_pipeline<T>, int>
template<typename T >
using grppi::requires_queue = typedef std::enable_if_t<is_queue<T>, int>
template<typename T >
using grppi::requires_reduce = typedef std::enable_if_t<is_reduce<T>,int>
template<typename Input , typename Transformer >
using grppi::result_type = typedef typename std::result_of<Transformer(Input)>::type

Determines the return type of appliying a function on a input type.

Enumeration Type Documentation

enum grppi::queue_mode
strong
Enumerator
lockfree 
blocking 

Function Documentation

template<typename... InputIt>
void grppi::advance_iterators ( size_t  delta,
InputIt &...  in 
)

Advance a pack of iterators by a delta. Every iterator in the parameter pack in is increased n steps.

template<typename... InputIt>
void grppi::advance_iterators ( InputIt &...  in)

Advance a pack of iterators by one unit. Every iterator in the parameter pack in is increased 1 step.

template<typename F , typename... Iterators, template< typename... > class T>
decltype(auto) grppi::apply_deref_increment ( F &&  f,
T< Iterators... > &  iterators 
)

Applies a callable object to the values obtained from the iterators in a tuple-like object. This function takes callable object f and a tuple-like with iterators (e.g. the result of make_tuple(it1, it2, it3))

and performs the action

f(*it1++, *it2++, *it3++);
Template Parameters
FType of the callable object.
IteratorsPack of iterator types.
TTuple-like type containing the iterators
Parameters
fCallable object to be invoked.
iteratorsIterators to be used.
Postcondition
All iterators in t have been incremented
Returns
The result of callable invocation.
template<typename F , typename... Iterators, template< typename... > class T>
decltype(auto) grppi::apply_increment ( F &&  f,
T< Iterators... > &  iterators 
)

Applies a callable object to the iterators in a tuple like-object and the increments those iterators. This function takes callable object f and a tuple-like object with iterators (e.g. the result of make_tuple(it1, it2, it3))

and performs the action

f(it1++, it2++, it3++);
Template Parameters
Typeof the callable object.
IteratorsPack of iterator types.
TTuple-like type containing the iterators
Parameters
fCallable object to be invoked.
iteratorsIterators to be used.
Postcondition
All iterators in t have been incremented
template<typename F , typename T >
decltype(auto) grppi::apply_iterators_indexed ( F &&  f,
T &&  t,
std::size_t  i 
)

Applies a callable object to the values obtained from the iterators in a tuple by indexing. This function takes callable object f, a tuple-like with iterators (e.g. the result of make_tuple(it1, it2, it3)) and an integral index i.

and performs the action

f(it1[i], it2[i], it3[i]);
Template Parameters
FType of the callable object.
TTuple type containing a tuple of iterators
Parameters
fCallable object to be invoked.
tTuple of iterators.
iIntegral index to apply to each interator.
Postcondition
All iterators in t have been incremented
f has been invoked with the contents of the iterator in the tuple.
template<typename E >
constexpr bool grppi::is_parallel_execution_ff ( )

Metafunction that determines if type E is parallel_execution_ff This metafunction evaluates to false if GRPPI_FF is disabled.

Template Parameters
Executionpolicy type.
template<typename E >
constexpr bool grppi::is_parallel_execution_native ( )

Metafunction that determines if type E is parallel_execution_native.

Template Parameters
Executionpolicy type.
template<typename E >
constexpr bool grppi::is_parallel_execution_omp ( )

Metafunction that determines if type E is parallel_execution_omp.

Template Parameters
Executionpolicy type.
template<typename E >
constexpr bool grppi::is_parallel_execution_tbb ( )

Metafunction that determines if type E is parallel_execution_tbb.

Template Parameters
Executionpolicy type.
template<typename E >
constexpr bool grppi::is_sequential_execution ( )

Determine if a type is a sequential execution policy.

template<typename E >
constexpr bool grppi::is_supported ( )

Determines if an execution policy is supported in the current compilation.

Note
This must be specialized by every execution policy.
template<>
constexpr bool grppi::is_supported< dynamic_execution > ( )

Determines if an execution policy is supported in the current compilation.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::is_supported< parallel_execution_native > ( )

Determines if an execution policy is supported in the current compilation.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::is_supported< parallel_execution_omp > ( )

Determines if an execution policy is supported in the current compilation.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::is_supported< parallel_execution_tbb > ( )

Determines if an execution policy is supported in the current compilation.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::is_supported< sequential_execution > ( )

Determines if an execution policy is supported in the current compilation.

Note
Specialization for sequential_execution.
template<typename T >
auto grppi::iterators_next ( T &&  t,
int  n 
)

Computes next n steps from a tuple of iterators.

Template Parameters
TTuple type cotaining a tuple of iterators.
Parameters
tTuple of iterators.
nNumber of steps to advance.
Note
This function is the equivalent to std::next for a tuple of iterators.
Returns
A new tuple with the result iterators.
template<typename Transformer , typename Predicate >
auto grppi::repeat_until ( Transformer &&  transform_op,
Predicate &&  predicate_op 
)
template<typename E >
constexpr bool grppi::supports_divide_conquer ( )

Determines if an execution policy supports the divide-conquer pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_divide_conquer< dynamic_execution > ( )

Determines if an execution policy supports the divide/conquer pattern.

Note
Specialization for dynamic_execution.

Determines if an execution policy supports the divide/conquer pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_divide_conquer< parallel_execution_omp > ( )

Determines if an execution policy supports the divide/conquer pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_divide_conquer< parallel_execution_tbb > ( )

Determines if an execution policy supports the divide/conquer pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_divide_conquer< sequential_execution > ( )

Determines if an execution policy supports the divide/conquer pattern.

Note
Specialization for sequential_execution.
template<typename E >
constexpr bool grppi::supports_map ( )

Determines if an execution policy supports the map pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_map< dynamic_execution > ( )

Determines if an execution policy supports the map pattern.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::supports_map< parallel_execution_native > ( )

Determines if an execution policy supports the map pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_map< parallel_execution_omp > ( )

Determines if an execution policy supports the map pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_map< parallel_execution_tbb > ( )

Determines if an execution policy supports the map pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_map< sequential_execution > ( )

Determines if an execution policy supports the map pattern.

Note
Specialization for sequential_execution.
template<typename E >
constexpr bool grppi::supports_map_reduce ( )

Determines if an execution policy supports the map-reduce pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_map_reduce< dynamic_execution > ( )

Determines if an execution policy supports the map-reduce pattern.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::supports_map_reduce< parallel_execution_native > ( )

Determines if an execution policy supports the map-reduce pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_map_reduce< parallel_execution_omp > ( )

Determines if an execution policy supports the map-reduce pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_map_reduce< parallel_execution_tbb > ( )

Determines if an execution policy supports the map-reduce pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_map_reduce< sequential_execution > ( )

Determines if an execution policy supports the map-reduce pattern.

Note
Specialization for sequential_execution.
template<typename E >
constexpr bool grppi::supports_pipeline ( )

Determines if an execution policy supports the pipeline pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_pipeline< dynamic_execution > ( )

Determines if an execution policy supports the pipeline pattern.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::supports_pipeline< parallel_execution_native > ( )

Determines if an execution policy supports the pipeline pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_pipeline< parallel_execution_omp > ( )

Determines if an execution policy supports the pipeline pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_pipeline< parallel_execution_tbb > ( )

Determines if an execution policy supports the pipeline pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_pipeline< sequential_execution > ( )

Determines if an execution policy supports the pipeline pattern.

Note
Specialization for sequential_execution.
template<typename E >
constexpr bool grppi::supports_reduce ( )

Determines if an execution policy supports the reduce pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_reduce< dynamic_execution > ( )

Determines if an execution policy supports the reduce pattern.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::supports_reduce< parallel_execution_native > ( )

Determines if an execution policy supports the reduce pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_reduce< parallel_execution_omp > ( )

Determines if an execution policy supports the reduce pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_reduce< parallel_execution_tbb > ( )

Determines if an execution policy supports the reduce pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_reduce< sequential_execution > ( )

Determines if an execution policy supports the reduce pattern.

Note
Specialization for sequential_execution.
template<typename E >
constexpr bool grppi::supports_stencil ( )

Determines if an execution policy supports the stencil pattern.

Note
This must be specialized by every execution policy supporting the pattern.
template<>
constexpr bool grppi::supports_stencil< dynamic_execution > ( )

Determines if an execution policy supports the stencil pattern.

Note
Specialization for dynamic_execution.
template<>
constexpr bool grppi::supports_stencil< parallel_execution_native > ( )

Determines if an execution policy supports the stencil pattern.

Note
Specialization for parallel_execution_native.
template<>
constexpr bool grppi::supports_stencil< parallel_execution_omp > ( )

Determines if an execution policy supports the stencil pattern.

Note
Specialization for parallel_execution_omp when GRPPI_OMP is enabled.
template<>
constexpr bool grppi::supports_stencil< parallel_execution_tbb > ( )

Determines if an execution policy supports the stencil pattern.

Note
Specialization for parallel_execution_omp when GRPPI_TBB is enabled.
template<>
constexpr bool grppi::supports_stencil< sequential_execution > ( )

Determines if an execution policy supports the stencil pattern.

Note
Specialization for sequential_execution.

Variable Documentation

template<typename... T>
constexpr bool grppi::are_iterators = internal::are_iterators<T...>::value
template<typename F , typename I >
constexpr bool grppi::is_consumer = internal::has_void_return<F,I>()
template<typename T >
constexpr bool grppi::is_context = internal::is_context<std::decay_t<T>>()
static
template<typename T >
constexpr bool grppi::is_farm = internal::is_farm<std::decay_t<T>>()
static
template<typename T >
constexpr bool grppi::is_filter = internal::is_filter<std::decay_t<T>>()
static
template<typename G >
constexpr bool grppi::is_generator
Initial value:
=
!internal::has_void_return<G>()
template<typename T >
constexpr bool grppi::is_iteration = internal::is_iteration<std::decay_t<T>>()
static
template<typename T >
constexpr bool grppi::is_iterator = internal::is_iterator<T>::value
template<typename T >
constexpr bool grppi::is_no_pattern
Initial value:
=
!is_farm<T> &&
!is_filter<T> &&
!is_pipeline<T> &&
!is_reduce<T> &&
!is_iteration<T>&&
!is_context<T>
template<typename T >
constexpr bool grppi::is_pattern = !is_no_pattern<T>
template<typename T >
constexpr bool grppi::is_pipeline = internal::is_pipeline<std::decay_t<T>>()
static
template<typename T >
constexpr bool grppi::is_queue = internal::is_queue<T>()
template<typename T >
constexpr bool grppi::is_reduce = internal::is_reduce<std::decay_t<T>>()