Skip to content

Commit bcc4a4a

Browse files
Fix minor compile issues with single-threading
Fix minor compile issues with single-threading Co-Authored-by: Marius Hillenbrand <[email protected]>
2 parents 795d4ee + b40f4dc commit bcc4a4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/recryption.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ void extractDigitsPacked(Ctxt& ctxt,
707707

708708
// Step 3: re-pack the slots
709709
HELIB_NTIMER_START(repack);
710-
const EncryptedArray& ea2 = *ctxt.getContext().ea;
710+
const EncryptedArray& ea2 = ctxt.getContext().getEA();
711711
NTL::ZZX xInSlots;
712712
std::vector<NTL::ZZX> xVec(ea2.size());
713713
ctxt = unpacked[0];

tests/test_common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ static inline long howManyThreads(long max = 0)
5757
" Zero means use the maximum available on system.");
5858

5959
// Get system threads and clip to max
60+
#ifdef HELIB_THREADS
6061
long threads = std::thread::hardware_concurrency();
62+
#else
63+
long threads = 1;
64+
#endif
6165
if (max != 0)
6266
threads = (threads > max) ? max : threads;
6367

0 commit comments

Comments
 (0)