![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Maintain a chained sequence of heterogeneous data blocks without allocation. More...
Go to the source code of this file.
Maintain a chained sequence of heterogeneous data blocks without allocation.
This building block for low-level memory management allows to build up a collection of entirely arbitrary data placed into existing and possibly distributed storage. The safety of storage and lifetime must be ensured by other means, since data access proceeds without further bound checks. However, a type-safe compile-time overlay of accessor marker types is provided, allowing to integrate such a storage layout into an overall memory safe arrangement.
A usage scenario would be gradually to build up an assortment of data elements directly in local automatic storage within an elaborate recursive call stack unfolding recursively. Notably the accessor marker types can be assembled independently from the provision of actual storage, as the connection between accessor and actual storage address is established late, on actual data access. Obviously, data access in such an arrangement requires traversal in several steps, which, on the other hand, can be justified by a good cache locality of recently used stack frames, thereby avoiding heap allocations altogether.
A HeteroData chain is built-up gradually, starting with a front-block
HeteroData<D1,D2,...>::Chain<D21,...>Definition in file hetero-data.hpp.
#include "lib/error.hpp"#include "lib/nocopy.hpp"#include "lib/meta/typelist.hpp"#include "lib/meta/typelist-manip.hpp"#include "lib/meta/typelist-util.hpp"#include "lib/meta/typeseq-util.hpp"#include <utility>#include <tuple>Namespaces | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::anonymous_namespace{hetero-data.hpp} |
| namespace | std |
| STL namespace. | |
Classes | |
| struct | StorageLoc |
| linked list of StorageFrame elements More... | |
| struct | StorageFrame< seg, DATA > |
| individual storage frame in a chain, holding a data tuple More... | |
| class | HeteroData< meta::Node< StorageFrame< seg, DATA... >, TAIL > > |
| struct | HeteroData< meta::Node< StorageFrame< seg, DATA... >, TAIL > >::Accessor< slot > |
| Accessor-functor to get at the data residing within some tuple element. More... | |
| struct | HeteroData< meta::Node< StorageFrame< seg, DATA... >, TAIL > >::Chain< VALS > |
| Constructor-functor to build an extra data segment, which can then be linked to the chain. More... | |
| class | HeteroData< meta::Nil > |
| class | HeteroData< DATA > |
| A setup with chained data tuples residing in distributed storage. More... | |
| struct | tuple_size< lib::HeteroData< DATA... > > |
| determine compile-time fixed size of a HeteroData More... | |
| struct | tuple_element< I, lib::HeteroData< DATA... > > |
| expose the type of the I-th element of a HeteroData chain More... | |
| struct | tuple_element< I, lib::HeteroData< lib::meta::Nil > > |
| struct | tuple_size< lib::StorageFrame< seg, DATA... > > |
| determine compile-time fixed size of a StorageFrame More... | |
| struct | tuple_element< I, lib::StorageFrame< seg, DATA... > > |
| delegate to the type access of a StorageFrame's underlying tuple More... | |
Functions | |
| StorageLoc *& | checkedTraversal (size_t segments, StorageLoc *last) |
| void | checkedDetach (size_t segments, StorageLoc *seg, void *chainBlock) |
| struct std::tuple_element< I, lib::HeteroData< DATA... > > |
| struct std::tuple_element< I, lib::HeteroData< lib::meta::Nil > > |
Collaboration diagram for tuple_element< I, lib::HeteroData< lib::meta::Nil > >: