Utils

Typedefs

using Ctext = Ciphertext<DCRTPoly>
namespace utils

Functions

static inline void printWelcomeMessage()

Print the welcome message with project and author details.

static inline chrono::time_point<steady_clock, nanoseconds> startTime()

Get the current time point for timing measurements.

Returns:

Current time point.

static inline void printDuration(chrono::time_point<steady_clock, nanoseconds> start, const string &caption = "Time Taken is: ", bool global_time = false)

Print duration since start time, optionally tracking global execution time.

Parameters:
  • start – Start time point.

  • caption – Caption for printed output (default: “Time Taken is:”).

  • global_time – If true, accumulates total runtime across calls.

static inline void printBootsrappingData(Ctext ciphertextIn, int depth)

Print bootstrapping metadata for a ciphertext.

Parameters:
  • ciphertextIn – Input ciphertext.

  • depth – Maximum depth available.

static inline int measureTime(const time_point<high_resolution_clock> &start, const time_point<high_resolution_clock> &end)

Measure elapsed time between two time points in seconds.

Parameters:
  • start – Start time.

  • end – End time.

Returns:

Elapsed time in seconds.

static inline time_point<high_resolution_clock> get_current_time()

Get current time point (high resolution).

Returns:

Current time point.

static inline int totalTime(vector<int> measuring)

Compute total time from a vector of durations.

Parameters:

measuring – Vector of time values (seconds).

Returns:

Total time in seconds.

Variables

static duration<long long, ratio<1, 1000>> total_time