Native parallel execution policy. This policy uses ISO C++ threads as implementation building block allowing usage in any ISO C++ compliant platform.
More...
#include <parallel_execution_native.h>
Native parallel execution policy. This policy uses ISO C++ threads as implementation building block allowing usage in any ISO C++ compliant platform.
grppi::parallel_execution_native::parallel_execution_native |
( |
| ) |
|
|
inlinenoexcept |
Default construct a native parallel execution policy.
Creates a parallel execution native object.
The concurrency degree is determined by the platform.
- Note
- The concurrency degree is fixed to 2 times the hardware concurrency degree.
grppi::parallel_execution_native::parallel_execution_native |
( |
int |
concurrency_degree, |
|
|
bool |
ordering = true |
|
) |
| |
|
inlinenoexcept |
Constructs a native parallel execution policy.
Creates a parallel execution native object selecting the concurrency degree and ordering mode.
- Parameters
-
concurrency_degree | Number of threads used for parallel algorithms. |
order | Whether ordered executions is enabled or disabled. |
int grppi::parallel_execution_native::concurrency_degree |
( |
| ) |
const |
|
inlinenoexcept |
Get number of grppi trheads.
void grppi::parallel_execution_native::disable_ordering |
( |
| ) |
|
|
inlinenoexcept |
void grppi::parallel_execution_native::enable_ordering |
( |
| ) |
|
|
inlinenoexcept |
int grppi::parallel_execution_native::get_thread_id |
( |
| ) |
const |
|
inlinenoexcept |
Get index of current thread in the thread table.
- Precondition
- The current thread is currently registered.
bool grppi::parallel_execution_native::is_ordered |
( |
| ) |
const |
|
inlinenoexcept |
template<typename T >
mpmc_queue<T> grppi::parallel_execution_native::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_native::set_concurrency_degree |
( |
int |
degree | ) |
|
|
inlinenoexcept |
Set number of grppi threads.
void grppi::parallel_execution_native::set_queue_attributes |
( |
int |
size, |
|
|
queue_mode |
mode |
|
) |
| |
|
inlinenoexcept |
Get a manager object for registration/deregistration in the thread index table for current thread.
Thread pool for lanching workers.
- Note
- This member is temporary and is likely to be deprecated or even removed in a future version of GrPPI.
The documentation for this class was generated from the following file: