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

OpenMP parallel execution policy. More...

#include <parallel_execution_omp.h>

Public Member Functions

 parallel_execution_omp () noexcept
 Default construct an OpenMP parallel execution policy. More...
 
 parallel_execution_omp (int concurrency_degree, bool order=true) noexcept
 Set num_threads to _threads in order to run in parallel. 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) 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. More...
 
int get_thread_id () const noexcept
 Get index of current thread in the thread table. More...
 

Detailed Description

OpenMP parallel execution policy.

This policy uses OpenMP as implementation back-end.

Constructor & Destructor Documentation

grppi::parallel_execution_omp::parallel_execution_omp ( )
inlinenoexcept

Default construct an OpenMP parallel execution policy.

Creates an OpenMP parallel execution object.

The concurrency degree is determined by the platform according to OpenMP rules.

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

Set num_threads to _threads in order to run in parallel.

Parameters
_threadsnumber of threads used in the parallel mode Constructs an OpenMP parallel execution policy.

Creates an OpenMP parallel execution object selecting the concurrency degree and ordering.

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

Member Function Documentation

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

Get number of grppi trheads.

void grppi::parallel_execution_omp::disable_ordering ( )
inlinenoexcept

Disable ordering.

void grppi::parallel_execution_omp::enable_ordering ( )
inlinenoexcept

Enable ordering.

int grppi::parallel_execution_omp::get_thread_id ( ) const
inlinenoexcept

Get index of current thread in the thread table.

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

Is execution ordered.

template<typename T >
mpmc_queue<T> grppi::parallel_execution_omp::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_omp::set_concurrency_degree ( int  degree)
inlinenoexcept

Set number of grppi threads.

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

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


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