ATLAS Offline Software
Loading...
Searching...
No Matches
ConcurrentToValMap.h File Reference

Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads. More...

#include "CxxUtils/ConcurrentHashmapImpl.h"
#include "CxxUtils/UIntConv.h"
#include "CxxUtils/concepts.h"
#include "CxxUtils/IsUpdater.h"
#include "CxxUtils/iterator_range.h"
#include "boost/iterator/iterator_facade.hpp"
#include <memory>
#include <type_traits>
#include <stdexcept>
#include "CxxUtils/ConcurrentToValMap.icc"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CxxUtils::const_iterator
 Iterator over all 1 bits in the set. More...
class  CxxUtils::iterator
 Iterator class. More...

Namespaces

namespace  CxxUtils

Typedefs

using CxxUtils::iterator_value = std::pair<const key_type, mapped_type&>
using CxxUtils::iterator_range = CxxUtils::iterator_range<iterator>

Functions

 CxxUtils::ConcurrentToValMap (Updater_t &&updater, size_type capacity=64, const Context_t &ctx=Updater_t::defaultContext())
 Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.
 CxxUtils::ConcurrentToValMap (const ConcurrentToValMap &other, Updater_t &&updater, size_t capacity=64, const Context_t &ctx=Updater_t::defaultContext())
 Constructor from another map.
template<class InputIterator>
 CxxUtils::ConcurrentToValMap (InputIterator f, InputIterator l, Updater_t &&updater, size_type capacity=64, const Context_t &ctx=Updater_t::defaultContext())
 Constructor from a range.
 CxxUtils::ConcurrentToValMap (const ConcurrentToValMap &other)=delete
 Copy / move / assign not supported.
 CxxUtils::ConcurrentToValMap (ConcurrentToValMap &&other)=delete
ConcurrentToValMapCxxUtils::operator= (const ConcurrentToValMap &other)=delete
ConcurrentToValMapCxxUtils::operator= (ConcurrentToValMap &&other)=delete
 CxxUtils::~ConcurrentToValMap ()
 Destructor.
const_iterator_range CxxUtils::range () const
 Return an iterator range covering the entire map.
const_iterator CxxUtils::cbegin () const
 Iterator at the start of the map.
const_iterator CxxUtils::cend () const
 Iterator at the end of the map.
bool CxxUtils::contains (key_type key) const
 Test if a key is in the container.
size_type CxxUtils::count (key_type key) const
 Return the number of times a given key is in the container.
const_iterator CxxUtils::find (key_type key) const
 Look up an element in the map.
mapped_type CxxUtils::at (key_type key) const
 Look up an element in the map.
std::pair< const_iterator, const_iteratorCxxUtils::equal_range (key_type key) const
 Return a range of iterators with entries matching key.
std::pair< const_iterator, bool > CxxUtils::emplace (key_type key, const mapped_type &val, const Context_t &ctx=Updater_t::defaultContext())
 Add an element to the map.
std::pair< const_iterator, bool > CxxUtils::emplace (key_type key, mapped_type &&val, const Context_t &ctx=Updater_t::defaultContext())
 Add an element to the map.
std::pair< const_iterator, bool > CxxUtils::emplace (key_type key, std::unique_ptr< mapped_type > val, const Context_t &ctx=Updater_t::defaultContext())
 Add an element to the map.
template<class PAIR>
std::pair< const_iterator, bool > CxxUtils::insert (const PAIR &p, const Context_t &ctx=Updater_t::defaultContext())
 Add an element to the map.
template<class PAIR>
std::pair< const_iterator, bool > CxxUtils::insert (PAIR &&p, const Context_t &ctx=Updater_t::defaultContext())
 Add an element to the map.
template<class InputIterator>
void CxxUtils::insert (InputIterator first, InputIterator last, const Context_t &ctx=Updater_t::defaultContext())
 Insert a range of elements to the map.
void CxxUtils::reserve (size_type capacity, const Context_t &ctx=Updater_t::defaultContext())
 Increase the table capacity.
void CxxUtils::rehash (size_type capacity)
 Increase the table capacity.
void CxxUtils::quiescent (const Context_t &ctx)
 Called when this thread is no longer referencing anything from this container.
void CxxUtils::swap (ConcurrentToValMap &other)
 Swap this container with another.
Updater_tCxxUtils::updater ()
 Access the Updater instance.
static key_type CxxUtils::keyAsKey (val_t val)
 Convert an underlying key value to this type's key value.
static val_t CxxUtils::keyAsVal (key_type k)
 Convert this type's key value to an underlying key value.
static mapped_type * CxxUtils::mappedAsMapped (val_t val)
 Convert an underlying mapped value a pointer to this type's mapped value.
static val_t CxxUtils::mappedAsVal (mapped_type *val)
 Convert this type's mapped value to an underlying mapped value.
Impl_t::const_iterator CxxUtils::get (key_type key) const
 Do a lookup in the table.
std::pair< const_iterator, bool > CxxUtils::put (const key_type key, std::unique_ptr< mapped_type > val, const Context_t &ctx=Updater_t::defaultContext())
 Insert an entry in the table.
Size, bit testing
bit_t CxxUtils::size () const
 Count the number of 1 bits in the set.
bool CxxUtils::empty () const
 Return true if there are no 1 bits in the set.
bit_t CxxUtils::capacity () const
 The number of bits that this container can hold.
Iterator operations.
const_iterator CxxUtils::begin () const
 Return a begin iterator.
const_iterator CxxUtils::end () const
 Return an end iterator.

Detailed Description

Hash map from pointers/integers to arbitrary objects allowing concurrent, lockless reads.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Jul, 2023

Definition in file ConcurrentToValMap.h.