|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Functions | |
| 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. | |
|
inline |
Calculate optimal chunk size based on data size and thread count.
Definition at line 130 of file ah-parallel.H.
References Aleph::maps(), and Aleph::size().
Referenced by Aleph::pall(), Aleph::pfilter(), Aleph::pfoldl(), Aleph::pfor_each(), Aleph::pfor_each(), and Aleph::pmaps().
Get reference from pointer or unique_ptr.
Definition at line 161 of file ah-parallel.H.
Referenced by Aleph::pall(), Aleph::pfilter(), Aleph::pfoldl(), Aleph::pfor_each(), and Aleph::pmaps().
For containers with random access, just return a pointer to it For non-random access, copy to vector.
Definition at line 151 of file ah-parallel.H.
References Aleph::maps().
Referenced by Aleph::pall(), Aleph::pfilter(), Aleph::pfoldl(), Aleph::pfor_each(), and Aleph::pmaps().