Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Typedefs | Variables
CxxUtils::detail Namespace Reference

Classes

struct  CHMTableIterator
 Helper to generate hash probes. More...
 
class  ConcurrentHashmapImpl
 Hash table allowing concurrent, lockless reads. More...
 
class  HashmapLock
 Helper to allow for external locking with put(). More...
 
struct  SizedUInt
 
struct  SizedUInt< 1 >
 
struct  SizedUInt< 2 >
 
struct  SizedUInt< 4 >
 
struct  SizedUInt< 8 >
 
union  UIntConv
 Helpers for converting between uintptr_t and a pointer or integer. More...
 
union  UIntConv< uintptr_t >
 

Typedefs

using ConcurrentHashmapVal_t = uintptr_t
 Type used for keys and values — an unsigned big enough to hold a pointer. More...
 

Variables

template<class HASHER , class T >
concept IsHash
 
template<class PRED , class ARG1 , class ARG2 = ARG1>
concept IsBinaryPredicate
 
template<class CONTAINER >
concept IsContiguousContainer
 
template<class ITERATOR , class VAL >
concept InputValIterator
 
template<class T >
concept IsConcurrentHashmapPayload
 Concept for a value that can be saved in a concurrent hash map. More...
 
template<class COMPARE , class RANGE , class KEY , class CONTEXT >
concept IsConcurrentRangeCompare
 Concept for comparison template argument. More...
 
template<template< class > class UPDATER>
concept IsUpdater
 Concept check for Updater class used by concurrent classes. More...
 

Typedef Documentation

◆ ConcurrentHashmapVal_t

using CxxUtils::detail::ConcurrentHashmapVal_t = typedef uintptr_t

Type used for keys and values — an unsigned big enough to hold a pointer.

Need to have this defined outside of ConcurrentHashmapImpl itself in order to avoid instantiation circularities, as the HASHER_ and MATCHER_ classes will probably want to use it.

Definition at line 40 of file ConcurrentHashmapImpl.h.

Variable Documentation

◆ InputValIterator

template<class ITERATOR , class VAL >
concept CxxUtils::detail::InputValIterator
Initial value:
=
std::input_iterator<ITERATOR> &&
std::convertible_to<std::iter_value_t<ITERATOR>, VAL>

Definition at line 55 of file concepts.h.

◆ IsBinaryPredicate

template<class PRED , class ARG1 , class ARG2 = ARG1>
concept CxxUtils::detail::IsBinaryPredicate
Initial value:
=
std::copy_constructible<PRED> &&
std::predicate<PRED, ARG1, ARG2>

Definition at line 41 of file concepts.h.

◆ IsConcurrentHashmapPayload

template<class T >
concept CxxUtils::detail::IsConcurrentHashmapPayload
Initial value:
= std::is_standard_layout_v<T> &&
std::is_trivial_v<T> &&
sizeof (T) <= sizeof (ConcurrentHashmapVal_t)

Concept for a value that can be saved in a concurrent hash map.

Must be a trivial type that can fit in a uintptr_t

Definition at line 49 of file ConcurrentHashmapImpl.h.

◆ IsConcurrentRangeCompare

template<class COMPARE , class RANGE , class KEY , class CONTEXT >
concept CxxUtils::detail::IsConcurrentRangeCompare
Initial value:
= requires (const COMPARE& c,
const RANGE& r1,
const RANGE& r2,
RANGE& r_nc,
const KEY& k,
const CONTEXT& ctx)
{
{ c(k, r2) } -> std::same_as<bool>;
{ c(r1, r2) } -> std::same_as<bool>;
{ c.inRange (k, r2) } -> std::same_as<bool>;
{ c.overlap (ctx, r1, r_nc) } -> std::same_as<int>;
{ c.extendRange (r_nc, r2) } -> std::same_as<int>;
}

Concept for comparison template argument.

See below for details.

Definition at line 101 of file ConcurrentRangeMap.h.

◆ IsContiguousContainer

template<class CONTAINER >
concept CxxUtils::detail::IsContiguousContainer
Initial value:
=
requires (CONTAINER& c)
{
requires std::contiguous_iterator<decltype(c.begin())>;
}

Definition at line 47 of file concepts.h.

◆ IsHash

template<class HASHER , class T >
concept CxxUtils::detail::IsHash
Initial value:
=
std::destructible<HASHER> &&
std::copy_constructible<HASHER> &&
requires (const HASHER& h, T x)
{
{ h(x) } -> std::same_as<std::size_t>;
}

Definition at line 30 of file concepts.h.

◆ IsUpdater

template<template< class > class UPDATER>
concept CxxUtils::detail::IsUpdater
Initial value:
= requires(UPDATER<int> x,
const typename UPDATER<int>::Context_t& ctx)
{
typename UPDATER<int>::Context_t;
{ x.get() } -> std::same_as<const int&>;
{ x.update (std::make_unique<int>(0), ctx) };
{ x.quiescent (ctx) };
{ x.defaultContext() } -> std::convertible_to<typename UPDATER<int>::Context_t>;
}

Concept check for Updater class used by concurrent classes.

In order to implement updating concurrently with reading, we need to defer deletion of objects until no thread can be referencing them any more. The policy for this for the internal implementation objects is set by the template UPDATER<T>. An object of this type owns an object of type T. It should provide a typedef Context_t, giving a type for an event context, identifying which thread/slot is currently executing. It should implement these operations:

  • const T& get() const Return the current object.
  • void update (std::unique_ptr<T> p, const Context_t& ctx); Atomically update the current object to be p. Deletion of the previous version should be deferred until no thread can be referencing it.
  • void quiescent (const Context_t& ctx); Declare that the thread described by ctx is no longer accessing the object.
  • static const Context_t& defaultContext(); Return a context object for the currently-executing thread.

For an example, see AthenaKernel/RCUUpdater.h.

Definition at line 51 of file IsUpdater.h.

CxxUtils::detail::ConcurrentHashmapVal_t
uintptr_t ConcurrentHashmapVal_t
Type used for keys and values — an unsigned big enough to hold a pointer.
Definition: ConcurrentHashmapImpl.h:40
requires
requires requires()
This specialization is used for classes deriving from DataObject.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:68
x
#define x
extractSporadic.h
list h
Definition: extractSporadic.py:97
h
python.compressB64.c
def c
Definition: compressB64.py:93
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
fitman.k
k
Definition: fitman.py:528