ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
CircuitFromMMap.h File Reference

Build in-memory circuits from the mmap-backed persistent store. More...

#include "provsql_utils.h"
#include "BooleanCircuit.h"
#include "GenericCircuit.h"
Include dependency graph for CircuitFromMMap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BooleanCircuit getBooleanCircuit (pg_uuid_t token, gate_t &gate)
 Build a BooleanCircuit from the mmap store rooted at token.
 
GenericCircuit getGenericCircuit (pg_uuid_t token)
 Build a GenericCircuit from the mmap store rooted at token.
 

Detailed Description

Build in-memory circuits from the mmap-backed persistent store.

Declares two free functions that traverse the memory-mapped circuit storage starting from a given root UUID and construct the corresponding in-memory circuit representation. These functions are the primary bridge between the persistent MMappedCircuit and the evaluation algorithms that operate on BooleanCircuit or GenericCircuit.

Definition in file CircuitFromMMap.h.

Function Documentation

◆ getBooleanCircuit()

BooleanCircuit getBooleanCircuit ( pg_uuid_t  token,
gate_t gate 
)

Build a BooleanCircuit from the mmap store rooted at token.

Performs a depth-first traversal of the persistent circuit starting at token, translating each gate_type to the corresponding BooleanGate and copying probabilities and info integers.

On return, gate is set to the gate_t identifier within the returned circuit that corresponds to token.

Parameters
tokenUUID of the root gate.
gateOutput: gate_t of the root within the returned circuit.
Returns
An in-memory BooleanCircuit.

Definition at line 73 of file CircuitFromMMap.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGenericCircuit()

GenericCircuit getGenericCircuit ( pg_uuid_t  token)

Build a GenericCircuit from the mmap store rooted at token.

Equivalent to createGenericCircuit() declared in MMappedCircuit.h. Performs a depth-first traversal and copies all gate metadata (type, info1/info2, extra strings, probabilities) into the returned GenericCircuit.

Parameters
tokenUUID of the root gate.
Returns
An in-memory GenericCircuit.

Definition at line 99 of file CircuitFromMMap.cpp.

Here is the caller graph for this function: