souffle  2.0.2-371-g6315b36
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Attributes | Private Member Functions
souffle::detail::brie::TrieBase< Dim, Derived > Class Template Reference

A base class for the Trie implementation allowing various specializations of the Trie template to inherit common functionality. More...

#include <Brie.h>

Collaboration diagram for souffle::detail::brie::TrieBase< Dim, Derived >:
Collaboration graph

Data Structures

struct  hint_statistics
 

Public Types

using const_entry_span_type = typename types::const_entry_span_type
 
using entry_span_type = typename types::entry_span_type
 
using entry_type = typename types::entry_type
 
using iterator = typename types::iterator
 
using iterator_core = typename types::iterator_core
 
using op_context = typename types::op_context
 

Public Member Functions

iterator begin () const
 Obtains an iterator referencing the first element stored within this trie. More...
 
bool empty () const
 Determines whether this trie is empty or not. More...
 
iterator end () const
 Obtains an iterator referencing the position after the last element stored within this trie. More...
 
iterator find (const_entry_span_type entry, op_context &ctxt) const
 
template<unsigned levels>
range< iteratorgetBoundaries (const entry_type &entry) const
 
template<unsigned levels>
range< iteratorgetBoundaries (const entry_type &entry, op_context &ctxt) const
 
template<unsigned levels>
range< iteratorgetBoundaries (const_entry_span_type entry) const
 
template<unsigned levels, typename... Values, typename = std::enable_if_t<(isRamType<Values> && ...)>>
range< iteratorgetBoundaries (Values... values) const
 
const store_typegetStore () const
 Provides protected access to the internally maintained store. More...
 
void insertAll (const TrieBase &other)
 Inserts all tuples stored within the given trie into this trie. More...
 
void printStats (std::ostream &out) const
 

Protected Types

using store_type = typename types::store_type
 
using types = TrieTypes< Dim >
 

Protected Attributes

hint_statistics hint_stats
 
store_type store
 

Private Member Functions

Derived & impl ()
 
const Derived & impl () const
 

Detailed Description

template<unsigned Dim, typename Derived>
class souffle::detail::brie::TrieBase< Dim, Derived >

A base class for the Trie implementation allowing various specializations of the Trie template to inherit common functionality.

Template Parameters
Dimthe number of dimensions / arity of the stored tuples
Derivedthe type derived from this base class

Definition at line 2031 of file Brie.h.

Member Typedef Documentation

◆ const_entry_span_type

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::const_entry_span_type = typename types::const_entry_span_type

Definition at line 2047 of file Brie.h.

◆ entry_span_type

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::entry_span_type = typename types::entry_span_type

Definition at line 2048 of file Brie.h.

◆ entry_type

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::entry_type = typename types::entry_type

Definition at line 2049 of file Brie.h.

◆ iterator

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::iterator = typename types::iterator

Definition at line 2050 of file Brie.h.

◆ iterator_core

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::iterator_core = typename types::iterator_core

Definition at line 2051 of file Brie.h.

◆ op_context

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::op_context = typename types::op_context

Definition at line 2052 of file Brie.h.

◆ store_type

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::store_type = typename types::store_type
protected

Definition at line 2042 of file Brie.h.

◆ types

template<unsigned Dim, typename Derived >
using souffle::detail::brie::TrieBase< Dim, Derived >::types = TrieTypes<Dim>
protected

Definition at line 2041 of file Brie.h.

Member Function Documentation

◆ begin()

template<unsigned Dim, typename Derived >
iterator souffle::detail::brie::TrieBase< Dim, Derived >::begin ( ) const
inline

Obtains an iterator referencing the first element stored within this trie.

Definition at line 2082 of file Brie.h.

2094  {

◆ empty()

template<unsigned Dim, typename Derived >
bool souffle::detail::brie::TrieBase< Dim, Derived >::empty ( ) const
inline

Determines whether this trie is empty or not.

Definition at line 2075 of file Brie.h.

2078  {

◆ end()

template<unsigned Dim, typename Derived >
iterator souffle::detail::brie::TrieBase< Dim, Derived >::end ( ) const
inline

Obtains an iterator referencing the position after the last element stored within this trie.

Definition at line 2090 of file Brie.h.

2094  {

◆ find()

template<unsigned Dim, typename Derived >
iterator souffle::detail::brie::TrieBase< Dim, Derived >::find ( const_entry_span_type  entry,
op_context ctxt 
) const
inline

Definition at line 2094 of file Brie.h.

2094  {
2095  op_context ctxt;
2096  return impl().template getBoundaries<levels>(entry, ctxt);
2097  }

◆ getBoundaries() [1/4]

template<unsigned Dim, typename Derived >
template<unsigned levels>
range<iterator> souffle::detail::brie::TrieBase< Dim, Derived >::getBoundaries ( const entry_type entry) const
inline

Definition at line 2121 of file Brie.h.

2123  { \

◆ getBoundaries() [2/4]

template<unsigned Dim, typename Derived >
template<unsigned levels>
range<iterator> souffle::detail::brie::TrieBase< Dim, Derived >::getBoundaries ( const entry_type entry,
op_context ctxt 
) const
inline

Definition at line 2116 of file Brie.h.

2116  { \
2117  op_context ctxt; \
2118  return impl().fn(entry, ctxt); \

◆ getBoundaries() [3/4]

template<unsigned Dim, typename Derived >
template<unsigned levels>
range<iterator> souffle::detail::brie::TrieBase< Dim, Derived >::getBoundaries ( const_entry_span_type  entry) const
inline

Definition at line 2110 of file Brie.h.

2110  {
2111  return impl().template getBoundaries<levels>(entry_type{ramBitCast(values)...});
2112  }
2113 

◆ getBoundaries() [4/4]

template<unsigned Dim, typename Derived >
template<unsigned levels, typename... Values, typename = std::enable_if_t<(isRamType<Values> && ...)>>
range<iterator> souffle::detail::brie::TrieBase< Dim, Derived >::getBoundaries ( Values...  values) const
inline

Definition at line 2126 of file Brie.h.

2138  {

◆ getStore()

template<unsigned Dim, typename Derived >
const store_type& souffle::detail::brie::TrieBase< Dim, Derived >::getStore ( ) const
inline

Provides protected access to the internally maintained store.

Definition at line 2068 of file Brie.h.

2074  {

◆ impl() [1/2]

template<unsigned Dim, typename Derived >
Derived& souffle::detail::brie::TrieBase< Dim, Derived >::impl ( )
inlineprivate

Definition at line 2032 of file Brie.h.

◆ impl() [2/2]

template<unsigned Dim, typename Derived >
const Derived& souffle::detail::brie::TrieBase< Dim, Derived >::impl ( ) const
inlineprivate

Definition at line 2036 of file Brie.h.

2045  {

◆ insertAll()

template<unsigned Dim, typename Derived >
void souffle::detail::brie::TrieBase< Dim, Derived >::insertAll ( const TrieBase< Dim, Derived > &  other)
inline

Inserts all tuples stored within the given trie into this trie.

This operation is considerably more efficient than the consecutive insertion of the elements in other into this trie.

Parameters
otherthe elements to be inserted into this trie

Definition at line 2061 of file Brie.h.

2066  {

◆ printStats()

template<unsigned Dim, typename Derived >
void souffle::detail::brie::TrieBase< Dim, Derived >::printStats ( std::ostream &  out) const
inline

Definition at line 2170 of file Brie.h.

2176  {
2177  template <typename IterCore>
2178  auto operator()(IterCore& core) -> decltype(get_nested_iter_core<Level - 1>()(core.getNested())) {
2179  return get_nested_iter_core<Level - 1>()(core.getNested());
2180  }

Field Documentation

◆ hint_stats

template<unsigned Dim, typename Derived >
hint_statistics souffle::detail::brie::TrieBase< Dim, Derived >::hint_stats
mutableprotected

Definition at line 2167 of file Brie.h.

◆ store

template<unsigned Dim, typename Derived >
store_type souffle::detail::brie::TrieBase< Dim, Derived >::store
protected

Definition at line 2044 of file Brie.h.


The documentation for this class was generated from the following file:
souffle::detail::brie::TrieBase::entry_type
typename types::entry_type entry_type
Definition: Brie.h:2049
souffle::ramBitCast
To ramBitCast(From source)
In C++20 there will be a new way to cast between types by reinterpreting bits (std::bit_cast),...
Definition: RamTypes.h:87
souffle::detail::brie::TrieBase::op_context
typename types::op_context op_context
Definition: Brie.h:2052
souffle::detail::brie::TrieBase::impl
Derived & impl()
Definition: Brie.h:2032