Skip to content

Commit

Permalink
Merge pull request #150 from openfheorg/dev
Browse files Browse the repository at this point in the history
Update main to v0.8.8
  • Loading branch information
yspolyakov authored Jun 25, 2024
2 parents 2ca3ce6 + 031e128 commit 867a0bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project (OpenFHE-Python)

set(OPENFHE_PYTHON_VERSION_MAJOR 0)
set(OPENFHE_PYTHON_VERSION_MINOR 8)
set(OPENFHE_PYTHON_VERSION_PATCH 7)
set(OPENFHE_PYTHON_VERSION_PATCH 8)
set(OPENFHE_PYTHON_VERSION ${OPENFHE_PYTHON_VERSION_MAJOR}.${OPENFHE_PYTHON_VERSION_MINOR}.${OPENFHE_PYTHON_VERSION_PATCH})

set(CMAKE_CXX_STANDARD 17)
Expand All @@ -14,7 +14,7 @@ if(APPLE)
set(CMAKE_CXX_VISIBILITY_PRESET default)
endif()

find_package(OpenFHE 1.1.3 REQUIRED)
find_package(OpenFHE 1.2.0 REQUIRED)
find_package(pybind11 REQUIRED)

set( CMAKE_CXX_FLAGS ${OpenFHE_CXX_FLAGS} )
Expand Down
9 changes: 4 additions & 5 deletions src/lib/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void bind_parameters(py::module &m,const std::string name)
.def("GetKeySwitchCount", &CCParams<T>::GetKeySwitchCount)
.def("GetEncryptionTechnique", &CCParams<T>::GetEncryptionTechnique)
.def("GetMultiplicationTechnique", &CCParams<T>::GetMultiplicationTechnique)
.def("GetMultiHopModSize", &CCParams<T>::GetMultiHopModSize)
.def("GetPRENumHops", &CCParams<T>::GetPRENumHops)
.def("GetInteractiveBootCompressionLevel", &CCParams<T>::GetInteractiveBootCompressionLevel)
// setters
.def("SetPlaintextModulus", &CCParams<T>::SetPlaintextModulus)
Expand Down Expand Up @@ -86,7 +86,7 @@ void bind_parameters(py::module &m,const std::string name)
.def("SetKeySwitchCount", &CCParams<T>::SetKeySwitchCount)
.def("SetEncryptionTechnique", &CCParams<T>::SetEncryptionTechnique)
.def("SetMultiplicationTechnique", &CCParams<T>::SetMultiplicationTechnique)
.def("SetMultiHopModSize", &CCParams<T>::SetMultiHopModSize)
.def("SetPRENumHops", &CCParams<T>::SetPRENumHops)
.def("SetInteractiveBootCompressionLevel", &CCParams<T>::SetInteractiveBootCompressionLevel)
.def("__str__",[](const CCParams<T> &params) {
std::stringstream stream;
Expand Down Expand Up @@ -930,13 +930,11 @@ void bind_enums_and_constants(py::module &m)
.value("NOT_SET", ProxyReEncryptionMode::NOT_SET)
.value("INDCPA", ProxyReEncryptionMode::INDCPA)
.value("FIXED_NOISE_HRA", ProxyReEncryptionMode::FIXED_NOISE_HRA)
.value("NOISE_FLOODING_HRA", ProxyReEncryptionMode::NOISE_FLOODING_HRA)
.value("DIVIDE_AND_ROUND_HRA", ProxyReEncryptionMode::DIVIDE_AND_ROUND_HRA);
.value("NOISE_FLOODING_HRA", ProxyReEncryptionMode::NOISE_FLOODING_HRA);
m.attr("NOT_SET") = py::cast(ProxyReEncryptionMode::NOT_SET);
m.attr("INDCPA") = py::cast(ProxyReEncryptionMode::INDCPA);
m.attr("FIXED_NOISE_HRA") = py::cast(ProxyReEncryptionMode::FIXED_NOISE_HRA);
m.attr("NOISE_FLOODING_HRA") = py::cast(ProxyReEncryptionMode::NOISE_FLOODING_HRA);
m.attr("DIVIDE_AND_ROUND_HRA") = py::cast(ProxyReEncryptionMode::DIVIDE_AND_ROUND_HRA);

// MultipartyMode
py::enum_<MultipartyMode>(m, "MultipartyMode")
Expand Down Expand Up @@ -1063,6 +1061,7 @@ void bind_encodings(py::module &m)
.def("SetFormat", &PlaintextImpl::SetFormat,
ptx_SetFormat_docs,
py::arg("fmt"))
.def("GetCoefPackedValue", &PlaintextImpl::GetCoefPackedValue)
.def("GetPackedValue", &PlaintextImpl::GetPackedValue)
.def("GetCKKSPackedValue", &PlaintextImpl::GetCKKSPackedValue,
ptx_GetCKKSPackedValue_docs)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/binfhe_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void bind_binfhe_context(py::module &m)
py::arg("set"),
py::arg("method") = GINX)
//void GenerateBinFHEContext(BINFHE_PARAMSET set, bool arbFunc, uint32_t logQ = 11, int64_t N = 0, BINFHE_METHOD method = GINX, bool timeOptimization = false)
.def("GenerateBinFHEContext", static_cast<void (BinFHEContext::*)(BINFHE_PARAMSET, bool, uint32_t, int64_t, BINFHE_METHOD, bool)>(&BinFHEContext::GenerateBinFHEContext),
.def("GenerateBinFHEContext", static_cast<void (BinFHEContext::*)(BINFHE_PARAMSET, bool, uint32_t, uint32_t, BINFHE_METHOD, bool)>(&BinFHEContext::GenerateBinFHEContext),
binfhe_GenerateBinFHEContext_docs,
py::arg("set"),
py::arg("arbFunc"),
Expand Down

0 comments on commit 867a0bd

Please sign in to comment.