openfheorg / openfhe-development

This is the development repository for the OpenFHE library. The current (stable) version is v1.2.0 (released on June 25, 2024).
BSD 2-Clause "Simplified" License
655 stars 167 forks source link

Some suggestions #800

Open HovsepPapoyan opened 3 weeks ago

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

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

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

void EvalBootstrapSetup(std::vector levelBudget = {5, 4}, std::vector 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 EvalInnerProduct(ConstPlaintext plaintext, ConstCiphertext ciphertext, usint batchSize) const;

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