Metall  v0.28
A persistent memory allocator for data-centric analytics
metall::container Namespace Reference

Namespace for Metall container. More...

Namespaces

 experimental
 Namespace for Metall containers in an experimental phase.
 

Classes

class  concurrent_map
 A concurrent map container which can be stored in persistent memory. This container does not allocate mutex objects internally, but allocates them as static objects. To achieve high concurrency, this container allocates multiple banks, where a bank consists of an actual STL map object and a mutex object. More...
 
class  fallback_allocator_adaptor
 A STL compatible allocator which fallbacks to a heap allocator (e.g., malloc()) if its constructor receives no argument to construct the stateful allocator instance. More...
 
class  string_key_store
 A ke-value store that uses string for its key. More...
 
class  string_key_store_locator
 

Typedefs

template<typename T , typename Allocator = manager::allocator_type<T>>
using deque = boost::container::deque< T, Allocator >
 A deque container that uses Metall as its default allocator. More...
 
template<typename T , typename Allocator = manager::allocator_type<T>>
using list = boost::container::list< T, Allocator >
 A list container that uses Metall as its default allocator. More...
 
template<class Key , class T , class Compare = std::less<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using map = boost::container::map< Key, T, Compare, Allocator >
 A map container that uses Metall as its default allocator. More...
 
template<class Key , class T , class Compare = std::less<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using multimap = boost::container::multimap< Key, T, Compare, Allocator >
 A multimap container that uses Metall as its default allocator. More...
 
template<typename T , typename Container = vector<T>, typename Compare = std::less<typename Container::value_type>>
using priority_queue = std::priority_queue< T, Container >
 A priority_queue container that uses Metall as its default allocator. More...
 
template<typename T , typename Container = deque<T>>
using queue = std::queue< T, Container >
 A queue container that uses Metall as its default allocator. More...
 
template<class OuterAlloc , class... InnerAlloc>
using scoped_allocator_adaptor = boost::container::scoped_allocator_adaptor< OuterAlloc, InnerAlloc... >
 An allocator which can be used with multilevel containers. More...
 
template<class Key , class Compare = std::less<Key>, class Allocator = manager::allocator_type<Key>>
using set = boost::container::set< Key, Compare, Allocator >
 A set container that uses Metall as its default allocator. More...
 
template<class Key , class Compare = std::less<Key>, class Allocator = manager::allocator_type<Key>>
using multiset = boost::container::multiset< Key, Compare, Allocator >
 A multiset container that uses Metall as its default allocator. More...
 
template<typename T , typename Container = deque<T>>
using stack = std::stack< T, Container >
 A stack container that uses Metall as its default allocator. More...
 
template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = metall::manager::allocator_type<CharT>>
using basic_string = boost::container::basic_string< CharT, Traits, Allocator >
 A string container that uses Metall as its default allocator. More...
 
using string = basic_string< char >
 A string container that uses char as its character type and Metall as its default allocator. More...
 
using wstring = basic_string< wchar_t >
 A string container that uses wchar_t as its character type and Metall as its default allocator. More...
 
template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using unordered_flat_map = boost::unordered_flat_map< Key, T, Hash, KeyEqual, Allocator >
 An unordered_flat_map container that uses Metall as its default allocator. More...
 
template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using unordered_flat_set = boost::unordered_flat_set< Key, Hash, KeyEqual, Allocator >
 An unordered_flat_set container that uses Metall as its default allocator. More...
 
template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using unordered_map = boost::unordered_map< Key, T, Hash, KeyEqual, Allocator >
 An unordered_map container that uses Metall as its default allocator. More...
 
template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using unordered_multimap = boost::unordered_multimap< Key, T, Hash, KeyEqual, Allocator >
 An unordered_multimap container that uses Metall as its default allocator. More...
 
template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using unordered_node_map = boost::unordered_node_map< Key, T, Hash, KeyEqual, Allocator >
 An unordered_node_map container that uses Metall as its default allocator. More...
 
template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using unordered_node_set = boost::unordered_node_set< Key, Hash, KeyEqual, Allocator >
 An unordered_node_set container that uses Metall as its default allocator. More...
 
template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using unordered_set = boost::unordered_set< Key, Hash, KeyEqual, Allocator >
 An unordered_set container that uses Metall as its default allocator. More...
 
template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using unordered_multiset = boost::unordered_multiset< Key, Hash, KeyEqual, Allocator >
 An unordered_multiset container that uses Metall as its default allocator. More...
 
template<typename T , typename Allocator = manager::allocator_type<T>>
using vector = boost::container::vector< T, Allocator >
 A vector container that uses Metall as its default allocator. More...
 

Functions

template<typename stateful_allocatorator_type >
bool operator== (const fallback_allocator_adaptor< stateful_allocatorator_type > &rhd, const fallback_allocator_adaptor< stateful_allocatorator_type > &lhd)
 
template<typename stateful_allocatorator_type >
bool operator!= (const fallback_allocator_adaptor< stateful_allocatorator_type > &rhd, const fallback_allocator_adaptor< stateful_allocatorator_type > &lhd)
 

Detailed Description

Namespace for Metall container.

Typedef Documentation

◆ deque

template<typename T , typename Allocator = manager::allocator_type<T>>
using metall::container::deque = typedef boost::container::deque<T, Allocator>

A deque container that uses Metall as its default allocator.

Examples
metall_containers.cpp.

◆ list

template<typename T , typename Allocator = manager::allocator_type<T>>
using metall::container::list = typedef boost::container::list<T, Allocator>

A list container that uses Metall as its default allocator.

◆ map

template<class Key , class T , class Compare = std::less<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::map = typedef boost::container::map<Key, T, Compare, Allocator>

A map container that uses Metall as its default allocator.

Examples
string_map.cpp.

◆ multimap

template<class Key , class T , class Compare = std::less<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::multimap = typedef boost::container::multimap<Key, T, Compare, Allocator>

A multimap container that uses Metall as its default allocator.

◆ priority_queue

template<typename T , typename Container = vector<T>, typename Compare = std::less<typename Container::value_type>>
using metall::container::priority_queue = typedef std::priority_queue<T, Container>

A priority_queue container that uses Metall as its default allocator.

◆ queue

template<typename T , typename Container = deque<T>>
using metall::container::queue = typedef std::queue<T, Container>

A queue container that uses Metall as its default allocator.

◆ scoped_allocator_adaptor

template<class OuterAlloc , class... InnerAlloc>
using metall::container::scoped_allocator_adaptor = typedef boost::container::scoped_allocator_adaptor<OuterAlloc, InnerAlloc...>

An allocator which can be used with multilevel containers.

Examples
complex_map.cpp, multilevel_containers.cpp, and vector_of_vectors.cpp.

◆ set

template<class Key , class Compare = std::less<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::set = typedef boost::container::set<Key, Compare, Allocator>

A set container that uses Metall as its default allocator.

◆ multiset

template<class Key , class Compare = std::less<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::multiset = typedef boost::container::multiset<Key, Compare, Allocator>

A multiset container that uses Metall as its default allocator.

◆ stack

template<typename T , typename Container = deque<T>>
using metall::container::stack = typedef std::stack<T, Container>

A stack container that uses Metall as its default allocator.

◆ basic_string

template<class CharT , class Traits = std::char_traits<CharT>, class Allocator = metall::manager::allocator_type<CharT>>
using metall::container::basic_string = typedef boost::container::basic_string<CharT, Traits, Allocator>

A string container that uses Metall as its default allocator.

◆ string

using metall::container::string = typedef basic_string<char>

A string container that uses char as its character type and Metall as its default allocator.

Examples
datastore_description.cpp, json_create.cpp, object_attribute.cpp, object_attribute_api_list.cpp, and snapshot.cpp.

◆ wstring

using metall::container::wstring = typedef basic_string<wchar_t>

A string container that uses wchar_t as its character type and Metall as its default allocator.

◆ unordered_flat_map

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::unordered_flat_map = typedef boost::unordered_flat_map<Key, T, Hash, KeyEqual, Allocator>

An unordered_flat_map container that uses Metall as its default allocator.

◆ unordered_flat_set

template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::unordered_flat_set = typedef boost::unordered_flat_set<Key, Hash, KeyEqual, Allocator>

An unordered_flat_set container that uses Metall as its default allocator.

◆ unordered_map

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::unordered_map = typedef boost::unordered_map<Key, T, Hash, KeyEqual, Allocator>

An unordered_map container that uses Metall as its default allocator.

Examples
multilevel_containers.cpp.

◆ unordered_multimap

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::unordered_multimap = typedef boost::unordered_multimap<Key, T, Hash, KeyEqual, Allocator>

An unordered_multimap container that uses Metall as its default allocator.

Examples
multilevel_containers.cpp.

◆ unordered_node_map

template<class Key , class T , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<std::pair<const Key, T>>>
using metall::container::unordered_node_map = typedef boost::unordered_node_map<Key, T, Hash, KeyEqual, Allocator>

An unordered_node_map container that uses Metall as its default allocator.

◆ unordered_node_set

template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::unordered_node_set = typedef boost::unordered_node_set<Key, Hash, KeyEqual, Allocator>

An unordered_node_set container that uses Metall as its default allocator.

◆ unordered_set

template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::unordered_set = typedef boost::unordered_set<Key, Hash, KeyEqual, Allocator>

An unordered_set container that uses Metall as its default allocator.

◆ unordered_multiset

template<class Key , class Hash = std::hash<Key>, class KeyEqual = std::equal_to<Key>, class Allocator = manager::allocator_type<Key>>
using metall::container::unordered_multiset = typedef boost::unordered_multiset<Key, Hash, KeyEqual, Allocator>

An unordered_multiset container that uses Metall as its default allocator.

◆ vector

template<typename T , typename Allocator = manager::allocator_type<T>>
using metall::container::vector = typedef boost::container::vector<T, Allocator>

A vector container that uses Metall as its default allocator.

Examples
multilevel_containers.cpp.

Function Documentation

◆ operator==()

template<typename stateful_allocatorator_type >
bool metall::container::operator== ( const fallback_allocator_adaptor< stateful_allocatorator_type > &  rhd,
const fallback_allocator_adaptor< stateful_allocatorator_type > &  lhd 
)
inline

◆ operator!=()

template<typename stateful_allocatorator_type >
bool metall::container::operator!= ( const fallback_allocator_adaptor< stateful_allocatorator_type > &  rhd,
const fallback_allocator_adaptor< stateful_allocatorator_type > &  lhd 
)
inline