Runner#
Currently, this API is unsupported in Python
-
class Runner#
A class for computing a circuit based on inputs.
Public Functions
-
Runner(const HeContext &h, const Schedule &s)#
Construct a Runner for computing a circuit.
- Parameters:
h – [in] The underlying context for the computation.
s – [in] The schedule to use.
-
Runner(const HeContext &h, const Circuit &c)#
Construct a Runner object with simple scheduling and one CPU thread.
- Parameters:
h – Context
c – Circuit
-
void fillUnlabeledData(const CtxtCache &cache)#
Takes the ciphertexts stored in given cache, and places them in InputCtxtNode based on their NodeIds.
- Parameters:
cache – Input cache
-
void setByLabelCopy(const NodeLabel &label, const CTileTensor &c)#
Set a CTileTensor associated with a label.
This fills all one InputCtxtNode for each tile of this tile tensor.
- Parameters:
label – The label of the CTileTensor.
c – The CTile.
-
void setByLabelCopy(const NodeLabel &label, const CTile &c)#
Sets the output of the InputCtxtNode associated with this label.
- Parameters:
label – The label of the InputCtxtNode.
-
inline const HeContext &getContext() const#
Get the HeContext the runner is using.
- Returns:
The HeContext.
-
void run()#
Compute the circuit by running several workers in parallel.
-
void preRun()#
Computes a one-time setup of the circuit which may include some of the nodes e.g., encoding of plaintexts.
-
void clearAfterRun()#
Reset the circuit after a run, preparing for another run.
This method should be called after each call to run(), and after the outputs had been read off the circuit.
-
std::shared_ptr<CTile> getCTileByLabel(const NodeLabel &l) const#
Return a CTile associated to a label.
- Parameters:
l – A label.
-
void getCTileTensorByLabel(const NodeLabel&, CTileTensor&) const#
Return a CTileTensor associated to a label.
- Parameters:
l – A label.
c – The resulting CTileTensor.
-
inline bool done() const#
Return whether the execution is complete.
-
inline void setVerbosity(Verbosity v)#
Set the verbosity level of printouts during run.
- Parameters:
v – The new verbosity level
-
inline void setMemorySoftLimit(int)#
-
inline void setNumThreads(int)#
-
inline void addCacheToHub(void*)#
-
inline void setCache(void*)#
-
inline void removeCache()#
Public Members
-
Statistics stats#
Public Static Functions
-
static inline void setProfilingTime(int sec)#
Set a time limit to the profiling the circuit.
- Parameters:
sec – Time limit (in seconds) to the profiling the circuit.
-
static inline void setTimeStatsFile(const std::string &file)#
The file to write the circuit time stats to (if profilingTime was set).
If empty, prints time stats to screen.
-
class Statistics#
-
Runner(const HeContext &h, const Schedule &s)#