Skip to content

Commit abd4585

Browse files
committed
Review updates and fixes.
1 parent 2ec7adf commit abd4585

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/pke/include/cryptocontext.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
#include <algorithm>
6767
#include <unordered_map>
6868
#include <set>
69-
#include <iostream>
69+
#ifdef DEBUG_KEY
70+
#include <iostream>
71+
#endif
7072

7173
namespace lbcrypto {
7274

src/pke/lib/scheme/ckksrns/ckksrns-advancedshe.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Ciphertext<DCRTPoly> AdvancedSHECKKSRNS::EvalMultMany(const std::vector<Cipherte
5050
const std::vector<EvalKey<DCRTPoly>>& evalKeys) const {
5151
const size_t inSize = ciphertextVec.size();
5252

53-
if (inSize < 2)
54-
OPENFHE_THROW("Input ciphertext vector size should be 1 or more");
53+
if (inSize == 0)
54+
OPENFHE_THROW("Input ciphertext vector is empty.");
5555

5656
if (inSize == 1)
5757
return ciphertextVec[0];

src/pke/lib/schemebase/base-advancedshe.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ template <class Element>
4646
Ciphertext<Element> AdvancedSHEBase<Element>::EvalAddMany(const std::vector<Ciphertext<Element>>& ciphertextVec) const {
4747
const size_t inSize = ciphertextVec.size();
4848

49-
if (ciphertextVec.size() < 2)
50-
OPENFHE_THROW("Input ciphertext vector size should be 1 or more");
49+
if (inSize == 0)
50+
OPENFHE_THROW("Input ciphertext vector is empty.");
5151

52-
if (ciphertextVec.size() == 1)
52+
if (inSize == 1)
5353
return ciphertextVec[0];
5454

5555
const size_t lim = inSize * 2 - 2;

0 commit comments

Comments
 (0)