souffle  2.0.2-371-g6315b36
Public Member Functions | Private Member Functions | Private Attributes
souffle::RecordTable Class Reference

#include <RecordTable.h>

Collaboration diagram for souffle::RecordTable:
Collaboration graph

Public Member Functions

RamDomain pack (const RamDomain *tuple, size_t arity)
 convert record to record reference More...
 
 RecordTable ()=default
 
const RamDomainunpack (RamDomain ref, size_t arity) const
 convert record reference to a record More...
 
virtual ~RecordTable ()=default
 

Private Member Functions

RecordMaplookupArity (size_t arity)
 lookup RecordMap for a given arity; if it does not exist, create new RecordMap More...
 

Private Attributes

std::unordered_map< size_t, RecordMapmaps
 Arity/RecordMap association. More...
 

Detailed Description

Definition at line 114 of file RecordTable.h.

Constructor & Destructor Documentation

◆ RecordTable()

souffle::RecordTable::RecordTable ( )
default

◆ ~RecordTable()

virtual souffle::RecordTable::~RecordTable ( )
virtualdefault

Member Function Documentation

◆ lookupArity()

RecordMap& souffle::RecordTable::lookupArity ( size_t  arity)
inlineprivate

lookup RecordMap for a given arity; if it does not exist, create new RecordMap

Definition at line 137 of file RecordTable.h.

146  {

◆ pack()

RamDomain souffle::RecordTable::pack ( const RamDomain tuple,
size_t  arity 
)
inline

convert record to record reference

Definition at line 120 of file RecordTable.h.

120  {
121  // Find a previously emplaced map
122  iter = maps.find(arity);

References maps.

◆ unpack()

const RamDomain* souffle::RecordTable::unpack ( RamDomain  ref,
size_t  arity 
) const
inline

convert record reference to a record

Definition at line 124 of file RecordTable.h.

128  :
129  /** @brief lookup RecordMap for a given arity; if it does not exist, create new RecordMap */
130  RecordMap& lookupArity(size_t arity) {
131  std::unordered_map<size_t, RecordMap>::iterator mapsIterator;
132 #pragma omp critical(RecordTableGetForArity)
133  {

Field Documentation

◆ maps

std::unordered_map<size_t, RecordMap> souffle::RecordTable::maps
private

Arity/RecordMap association.

Definition at line 148 of file RecordTable.h.

Referenced by pack().


The documentation for this class was generated from the following file:
souffle::RecordTable::maps
std::unordered_map< size_t, RecordMap > maps
Arity/RecordMap association.
Definition: RecordTable.h:148
souffle::RecordTable::lookupArity
RecordMap & lookupArity(size_t arity)
lookup RecordMap for a given arity; if it does not exist, create new RecordMap
Definition: RecordTable.h:137