souffle  2.0.2-371-g6315b36
Public Member Functions | Private Attributes
souffle::interpreter::Index< _Arity, Structure >::View Class Reference

A view on a relation caching local access patterns (not thread safe!). More...

#include <Index.h>

Inheritance diagram for souffle::interpreter::Index< _Arity, Structure >::View:
Inheritance graph
Collaboration diagram for souffle::interpreter::Index< _Arity, Structure >::View:
Collaboration graph

Public Member Functions

bool contains (const Tuple &entry)
 Tests whether the given entry is contained in this index. More...
 
bool contains (const Tuple &low, const Tuple &high)
 Tests whether any element in the given range is contained in this index. More...
 
souffle::range< iteratorrange (const Tuple &low, const Tuple &high)
 Obtains a pair of iterators representing the given range within this index. More...
 
 View (const Data &data)
 
- Public Member Functions inherited from souffle::interpreter::ViewWrapper
virtual ~ViewWrapper ()=default
 

Private Attributes

const Datadata
 
Hints hints
 

Detailed Description

template<size_t _Arity, template< size_t > typename Structure>
class souffle::interpreter::Index< _Arity, Structure >::View

A view on a relation caching local access patterns (not thread safe!).

Each thread should create and use its own view for accessing relations to exploit access patterns via operation hints.

Definition at line 172 of file Index.h.

Constructor & Destructor Documentation

◆ View()

template<size_t _Arity, template< size_t > typename Structure>
souffle::interpreter::Index< _Arity, Structure >::View::View ( const Data data)
inline

Definition at line 177 of file Index.h.

179 {

Member Function Documentation

◆ contains() [1/2]

template<size_t _Arity, template< size_t > typename Structure>
bool souffle::interpreter::Index< _Arity, Structure >::View::contains ( const Tuple entry)
inline

Tests whether the given entry is contained in this index.

Definition at line 180 of file Index.h.

◆ contains() [2/2]

template<size_t _Arity, template< size_t > typename Structure>
bool souffle::interpreter::Index< _Arity, Structure >::View::contains ( const Tuple low,
const Tuple high 
)
inline

Tests whether any element in the given range is contained in this index.

Definition at line 185 of file Index.h.

185  {data.lower_bound(low, hints), data.upper_bound(high, hints)};
186  }
187  };

References souffle::interpreter::Index< _Arity, Structure >::View::data, high, souffle::interpreter::Index< _Arity, Structure >::View::hints, and low.

◆ range()

template<size_t _Arity, template< size_t > typename Structure>
souffle::range<iterator> souffle::interpreter::Index< _Arity, Structure >::View::range ( const Tuple low,
const Tuple high 
)
inline

Obtains a pair of iterators representing the given range within this index.

Definition at line 190 of file Index.h.

193  {

Field Documentation

◆ data

template<size_t _Arity, template< size_t > typename Structure>
const Data& souffle::interpreter::Index< _Arity, Structure >::View::data
private

◆ hints

template<size_t _Arity, template< size_t > typename Structure>
Hints souffle::interpreter::Index< _Arity, Structure >::View::hints
mutableprivate

The documentation for this class was generated from the following file:
souffle::interpreter::Index::View::data
const Data & data
Definition: Index.h:174
low
d d low
Definition: htmlJsChartistMin.h:15
high
d high
Definition: htmlJsChartistMin.h:15
souffle::interpreter::Index::View::hints
Hints hints
Definition: Index.h:173