|
NumericAL
A header-only C++20 lexer built on REAL
|
One parallel_for handed to the pool: its chunks, the next one to take, and how many are done. Each run has its own, so a worker still leaving one run never touches the next. More...
#include <parallel.hpp>
Public Member Functions | |
| void | work () noexcept |
| Takes chunks until none is left, keeping the exception each throws. | |
Public Attributes | |
| chunk_runner | run {} |
| The chunk runner. | |
| const void * | body {} |
| The body it is handed. | |
| std::size_t | count {} |
| The number of iterations. | |
| std::size_t | chunk {} |
| Indices per chunk. | |
| std::size_t | chunks {} |
| Chunks. | |
| std::size_t | helpers {} |
| The workers that may join it beside the caller. | |
| std::size_t | core {no_core} |
| The caller's core: its worker sits it out (sits_out). | |
| std::atomic< std::size_t > | joined {0} |
| The workers that asked to. | |
| std::atomic< std::size_t > | next {0} |
| The next chunk to take. | |
| std::atomic< std::size_t > | finished {0} |
| The chunks done. | |
| std::mutex | lock |
| Orders the last chunk's signal against the caller's sleep. | |
| std::condition_variable | done |
| Signalled when the last chunk finishes. | |
| std::vector< std::exception_ptr > | failed |
| The exception of each chunk, if it threw. | |
One parallel_for handed to the pool: its chunks, the next one to take, and how many are done. Each run has its own, so a worker still leaving one run never touches the next.
Definition at line 243 of file parallel.hpp.
|
inlinenoexcept |
Takes chunks until none is left, keeping the exception each throws.
Definition at line 260 of file parallel.hpp.
The body it is handed.
Definition at line 246 of file parallel.hpp.
| std::size_t numerical::detail::pool_job::chunk {} |
Indices per chunk.
Definition at line 248 of file parallel.hpp.
| std::size_t numerical::detail::pool_job::chunks {} |
Chunks.
Definition at line 249 of file parallel.hpp.
| std::size_t numerical::detail::pool_job::core {no_core} |
The caller's core: its worker sits it out (sits_out).
Definition at line 251 of file parallel.hpp.
| std::size_t numerical::detail::pool_job::count {} |
The number of iterations.
Definition at line 247 of file parallel.hpp.
| std::condition_variable numerical::detail::pool_job::done |
Signalled when the last chunk finishes.
Definition at line 256 of file parallel.hpp.
| std::vector<std::exception_ptr> numerical::detail::pool_job::failed |
The exception of each chunk, if it threw.
Definition at line 257 of file parallel.hpp.
| std::atomic<std::size_t> numerical::detail::pool_job::finished {0} |
The chunks done.
Definition at line 254 of file parallel.hpp.
| std::size_t numerical::detail::pool_job::helpers {} |
The workers that may join it beside the caller.
Definition at line 250 of file parallel.hpp.
| std::atomic<std::size_t> numerical::detail::pool_job::joined {0} |
The workers that asked to.
Definition at line 252 of file parallel.hpp.
| std::mutex numerical::detail::pool_job::lock |
Orders the last chunk's signal against the caller's sleep.
Definition at line 255 of file parallel.hpp.
| std::atomic<std::size_t> numerical::detail::pool_job::next {0} |
The next chunk to take.
Definition at line 253 of file parallel.hpp.
| chunk_runner numerical::detail::pool_job::run {} |
The chunk runner.
Definition at line 245 of file parallel.hpp.