|
cyqlone
develop
Fast, parallel and vectorized solver for linear systems with optimal control structure.
|
#include <cyqlone/parallel.hpp>
Abstraction for a parallel execution context: a set of threads that can synchronize and communicate with each other using barriers.
Definition at line 31 of file parallel.hpp.
Public Types | |
| using | completion_type = EmptyCompletion |
| using | barrier_type = TreeBarrier<completion_type, uint16_t> |
Public Member Functions | |
| template<class F> | |
| void | run (F &&) |
| Execute the given function in parallel on all threads, blocking until completion. | |
| uint32_t | set_barrier_spin_count (uint32_t spin_count) |
| Configure the barrier spin count used in parallel synchronization before falling back to a futex wait. | |
Public Attributes | |
| const index_t | num_thr |
| barrier_type | barrier {static_cast<uint32_t>(num_thr), {}} |
Definition at line 37 of file parallel.hpp.
| using cyqlone::parallel::SharedContext::barrier_type = TreeBarrier<completion_type, uint16_t> |
Definition at line 39 of file parallel.hpp.
| void cyqlone::parallel::SharedContext::run | ( | F && | f | ) |
Execute the given function in parallel on all threads, blocking until completion.
The function will be called with a Context that contains the thread index, and that can be used to synchronize and communicate between threads.
Definition at line 191 of file parallel.hpp.
|
inline |
Configure the barrier spin count used in parallel synchronization before falling back to a futex wait.
Definition at line 53 of file parallel.hpp.
| const index_t cyqlone::parallel::SharedContext::num_thr |
Definition at line 40 of file parallel.hpp.
| barrier_type cyqlone::parallel::SharedContext::barrier {static_cast<uint32_t>(num_thr), {}} |
Definition at line 41 of file parallel.hpp.