To build examples see a page hosted on Read the Docs.
-
- Allocating a vector container.
-
- Taking snapshot
-
- Using the offset pointer to store pointer persistently.
In the examples below, we occasionally use STL-compatible containers exist in metall/container/ for better readability. Those containers are just alias of the corresponding containers in Boost.Container and do not have Metall-specific features. Therefore, the data structures in the examples below are more like how to use STL containers with custom allocators rather than how to use containers with just Metall.
-
- STL string container with Metall.
-
- Nested (multi-level) containers.
-
- Another multi-level STL container example.
-
- How to use an STL map container of which key is STL string.
-
- A complex STL map container with Metall.
-
- How to implement your own container (data structure) that A) can be stored in another container; B) holds another container inside.
-
- How to use Metall's logger.
-
- Set and get datastore description
-
- How to access object attributes
-
- List of API to manipulate object attributes
- metall_containers.cpp
- List of containers that use Metall at the default allocators.
-
- A CSR graph data structure (two 1D arrays) with Metall
-
- An adjacency-lis data structure (multi-level STL container) with Metall
-
- How to use our mutex_lock function
-
- How to use our persistent concurrent_map class
-
- How to use fallback_allocator
-
Use Metall with MPI program (each process creates its own Metall object).
-
Metall does not support multi-process, i.e., there is no inter-process synchronization mechanism in Metall. Metall assumes that each process access a different memory region. The examples above shows how to use Metall with MPI.
-
One can set a MPI CXX compiler to use by using 'MPI_CXX_COMPILE' CMake option.