Переглянути джерело

Erasing wrapper layer for MakeCKKSPackedPlaintext

Rener Oliveira (Ubuntu WSL) 1 рік тому
батько
коміт
e551ca676c

+ 0 - 6
include/pke/cryptocontext_wrapper.h

@@ -13,12 +13,6 @@ namespace py = pybind11;
 using namespace lbcrypto;
 using ParmType = typename DCRTPoly::Params;
 
-Plaintext MakeCKKSPackedPlaintextWrapper(std::shared_ptr<CryptoContextImpl<DCRTPoly>> &self, 
-            const std::vector<float> &value, 
-            size_t depth, uint32_t level, 
-            const std::shared_ptr<ParmType> params,
-            usint slots);
-
 Ciphertext<DCRTPoly> EvalFastRotationPrecomputeWrapper(CryptoContext<DCRTPoly>& self,
                                                         ConstCiphertext<DCRTPoly> ciphertext);
 

+ 0 - 14
src/pke/cryptocontext_wrapper.cpp

@@ -9,20 +9,6 @@
 using namespace lbcrypto;
 namespace py = pybind11;
 
-Plaintext MakeCKKSPackedPlaintextWrapper(std::shared_ptr<CryptoContextImpl<DCRTPoly>> &self, 
-            const std::vector<float> &value, 
-            size_t depth, uint32_t level, 
-            const std::shared_ptr<ParmType> params,
-            usint slots)
-            {
-                if (!value.size())
-                    OPENFHE_THROW(config_error, "Cannot encode an empty value vector");
-
-                std::vector<std::complex<double>> complexValue(value.size());
-                std::transform(value.begin(), value.end(), complexValue.begin(),
-                       [](float da) { return std::complex<double>(da); });
-                return self->MakeCKKSPackedPlaintext(complexValue, depth, level, params, slots); }
-
 Ciphertext<DCRTPoly> EvalFastRotationPrecomputeWrapper(CryptoContext<DCRTPoly> &self,ConstCiphertext<DCRTPoly> ciphertext) {
     std::shared_ptr<std::vector<DCRTPoly>> precomp = self->EvalFastRotationPrecompute(ciphertext);
     std::vector<DCRTPoly> elements = *(precomp.get());