|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Holder for converted containers (either pointer or unique_ptr to vector). More...
#include <ah-parallel.H>
Public Types | |
| using | value_type = std::decay_t< decltype(*std::begin(std::declval< Container & >()))> |
| using | holder_type = std::conditional_t< parallel_detail::has_random_access< Container >(), const Container *, std::unique_ptr< std::vector< value_type > > > |
Public Member Functions | |
| ContainerHolder (const Container &c) | |
| decltype(auto) | get () const |
| size_t | size () const noexcept |
| Size is always O(1) - either from random access or from cached vector size. | |
| auto | begin () const |
| auto | end () const |
Public Attributes | |
| holder_type | data |
| size_t | cached_size |
| Cached size for O(1) access. | |
Holder for converted containers (either pointer or unique_ptr to vector).
For containers with random access, stores a pointer to the original. For containers without random access (like DynList), copies to a vector.
IMPORTANT: After construction, size() is always O(1) because:
Definition at line 1562 of file ah-parallel.H.
| using Aleph::parallel_zip_detail::ContainerHolder< Container >::holder_type = std::conditional_t< parallel_detail::has_random_access<Container>(), const Container *, std::unique_ptr<std::vector<value_type> >> |
Definition at line 1565 of file ah-parallel.H.
| using Aleph::parallel_zip_detail::ContainerHolder< Container >::value_type = std::decay_t<decltype(*std::begin(std::declval<Container &>()))> |
Definition at line 1564 of file ah-parallel.H.
|
inlineexplicit |
Definition at line 1573 of file ah-parallel.H.
|
inline |
Definition at line 1600 of file ah-parallel.H.
|
inline |
Definition at line 1601 of file ah-parallel.H.
|
inline |
Definition at line 1589 of file ah-parallel.H.
|
inlinenoexcept |
Size is always O(1) - either from random access or from cached vector size.
Definition at line 1598 of file ah-parallel.H.
| size_t Aleph::parallel_zip_detail::ContainerHolder< Container >::cached_size |
Cached size for O(1) access.
Definition at line 1571 of file ah-parallel.H.
Definition at line 1570 of file ah-parallel.H.