GrPPI  0.2
Generic and Reusable Parallel Pattern Interface
Public Member Functions | List of all members
grppi::parallel_execution_tbb Class Reference

TBB parallel execution policy. More...

#include <parallel_execution_tbb.h>

Public Member Functions

 parallel_execution_tbb () noexcept
 Default construct a TBB parallel execution policy. More...
 
 parallel_execution_tbb (int concurrency_degree, bool order=true) noexcept
 Constructs a TBB parallel execution policy. More...
 
void set_concurrency_degree (int degree) noexcept
 Set number of grppi threads. More...
 
int concurrency_degree () const noexcept
 Get number of grppi trheads. More...
 
void enable_ordering () noexcept
 Enable ordering. More...
 
void disable_ordering () noexcept
 Disable ordering. More...
 
bool is_ordered () const noexcept
 Is execution ordered. More...
 
void set_queue_attributes (int size, queue_mode mode, int tokens) noexcept
 Sets the attributes for the queues built through make_queue<T>() More...
 
template<typename T >
mpmc_queue< T > make_queue () const
 Makes a communication queue for elements of type T. Constructs a queue using the attributes that can be set via set_queue_attributes(). The value is returned via move semantics. More...
 
int tokens () const noexcept
 

Detailed Description

TBB parallel execution policy.

This policy uses Intel Threading Building Blocks as implementation back end.

Constructor & Destructor Documentation

grppi::parallel_execution_tbb::parallel_execution_tbb ( )
inlinenoexcept

Default construct a TBB parallel execution policy.

Creates a TBB parallel execution object.

The concurrency degree is determined by the platform.

grppi::parallel_execution_tbb::parallel_execution_tbb ( int  concurrency_degree,
bool  order = true 
)
inlinenoexcept

Constructs a TBB parallel execution policy.

Creates a TBB parallel execution object selecting the concurrency degree.

Parameters
concurrency_degreeNumber of threads used for parallel algorithms.
orderWhether ordered executions is enabled or disabled.

Member Function Documentation

int grppi::parallel_execution_tbb::concurrency_degree ( ) const
inlinenoexcept

Get number of grppi trheads.

void grppi::parallel_execution_tbb::disable_ordering ( )
inlinenoexcept

Disable ordering.

void grppi::parallel_execution_tbb::enable_ordering ( )
inlinenoexcept

Enable ordering.

bool grppi::parallel_execution_tbb::is_ordered ( ) const
inlinenoexcept

Is execution ordered.

template<typename T >
mpmc_queue<T> grppi::parallel_execution_tbb::make_queue ( ) const
inline

Makes a communication queue for elements of type T. Constructs a queue using the attributes that can be set via set_queue_attributes(). The value is returned via move semantics.

void grppi::parallel_execution_tbb::set_concurrency_degree ( int  degree)
inlinenoexcept

Set number of grppi threads.

void grppi::parallel_execution_tbb::set_queue_attributes ( int  size,
queue_mode  mode,
int  tokens 
)
inlinenoexcept

Sets the attributes for the queues built through make_queue<T>()

int grppi::parallel_execution_tbb::tokens ( ) const
inlinenoexcept

Get num of tokens.


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