openfhe-development icon indicating copy to clipboard operation
openfhe-development copied to clipboard

Some suggestions

Open HovsepPapoyan opened this issue 1 year ago • 0 comments

  1. In the following funtions, instead of "std::string" it would be nice to use "const std::string&":

template <typename ST> static bool SerializeEvalAutomorphismKey(std::ostream& ser, const ST& sertype, std::string id = ""); template <typename ST> static bool SerializeEvalMultKey(std::ostream& ser, const ST& sertype, std::string id = ""); template <typename ST> static bool SerializeEvalSumKey(std::ostream& ser, const ST& sertype, std::string id = "");

  1. In the following function, instead of "std::vector<uint32_t>" it would be nice to use "const std::vector<uint32_t>&":

void EvalBootstrapSetup(std::vector<uint32_t> levelBudget = {5, 4}, std::vector<uint32_t> dim1 = {0, 0}, uint32_t slots = 0, uint32_t correctionFactor = 0, bool precompute = true);

  1. For the sake of completness it might be worth to provide this variant also:

Ciphertext<Element> EvalInnerProduct(ConstPlaintext plaintext, ConstCiphertext<Element> ciphertext, usint batchSize) const;

  1. It would be a good idea to provide noexcept guarantees whenever possible.

HovsepPapoyan avatar Jun 11 '24 12:06 HovsepPapoyan