|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Classes | |
| struct | chunk_bounds |
Functions | |
| ThreadPool & | selected_parallel_pool (const ParallelOptions &options) |
| size_t | chunk_count (const size_t n, const size_t chunk_size) noexcept |
| chunk_bounds | bounds_for_chunk (const size_t idx, const size_t n, const size_t chunk_size) noexcept |
| size_t | chunk_size (const size_t n, const size_t num_threads, const size_t min_chunk=64) |
| Calculate optimal chunk size based on data size and thread count. | |
| template<typename Container > | |
| constexpr bool | has_random_access () |
| Check if container supports random access. | |
| template<typename Container > | |
| auto | ensure_random_access (const Container &c) |
| For containers with random access, just return a pointer to it For non-random access, copy to vector. | |
| template<typename T > | |
| decltype(auto) | deref (T &&ptr) |
| Get reference from pointer or unique_ptr. | |
| size_t | effective_parallel_chunk_size (const size_t n, const ThreadPool &pool, const ParallelOptions &options, const size_t min_chunk=64) |
| bool | use_sequential_parallel_path (const size_t n, const ThreadPool &pool, const ParallelOptions &options) noexcept |
| void | throw_if_parallel_canceled (const CancellationToken &token) |
| ThreadPool & | select_pool (const ParallelOptions &options) |
| size_t | resolve_chunk_size (const size_t total, const size_t num_threads, const ParallelOptions &options, const size_t min_chunk=1) |
| bool | use_sequential_path (const size_t total, const ThreadPool &pool, const ParallelOptions &options) noexcept |
| void | throw_if_canceled (const CancellationToken &token) |
| template<typename InputIt1 , typename InputIt2 , typename OutputIt , typename Compare > | |
| void | merge_sequential (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, OutputIt d_first, Compare comp, const CancellationToken &token) |
|
inlinenoexcept |
Definition at line 150 of file ah-parallel.H.
References chunk_size(), and offset.
|
inlinenoexcept |
Definition at line 145 of file ah-parallel.H.
References chunk_size().
|
inline |
Calculate optimal chunk size based on data size and thread count.
Definition at line 158 of file ah-parallel.H.
References Aleph::size().
Referenced by bounds_for_chunk(), chunk_count(), effective_parallel_chunk_size(), and resolve_chunk_size().
Get reference from pointer or unique_ptr.
Definition at line 189 of file ah-parallel.H.
|
inline |
Definition at line 197 of file ah-parallel.H.
References chunk_size(), Aleph::ThreadPool::num_threads(), and options.
| auto Aleph::parallel_detail::ensure_random_access | ( | const Container & | c | ) |
For containers with random access, just return a pointer to it For non-random access, copy to vector.
Definition at line 179 of file ah-parallel.H.
|
constexpr |
Check if container supports random access.
Definition at line 169 of file ah-parallel.H.
| void Aleph::parallel_detail::merge_sequential | ( | InputIt1 | first1, |
| InputIt1 | last1, | ||
| InputIt2 | first2, | ||
| InputIt2 | last2, | ||
| OutputIt | d_first, | ||
| Compare | comp, | ||
| const CancellationToken & | token | ||
| ) |
Definition at line 1654 of file thread_pool.H.
References Aleph::and, and throw_if_canceled().
|
inline |
Definition at line 1606 of file thread_pool.H.
References chunk_size(), and options.
|
inline |
Definition at line 1601 of file thread_pool.H.
References Aleph::default_pool(), and options.
|
inline |
Definition at line 140 of file ah-parallel.H.
References Aleph::default_pool(), and options.
|
inline |
Definition at line 1648 of file thread_pool.H.
References Aleph::CancellationToken::throw_if_cancellation_requested().
Referenced by merge_sequential().
|
inline |
Definition at line 228 of file ah-parallel.H.
References Aleph::CancellationToken::throw_if_cancellation_requested().
|
inlinenoexcept |
Definition at line 213 of file ah-parallel.H.
References Aleph::and, and options.
|
inlinenoexcept |
Definition at line 1629 of file thread_pool.H.
References Aleph::and, and options.