From cb8e46d2f311390dfe4721bb3529e8815169d273 Mon Sep 17 00:00:00 2001 From: Marcel Keller Date: Fri, 27 Mar 2020 12:14:55 +1100 Subject: [PATCH] Fix compilation with GFP_MOD_SZ other than two. --- FHEOffline/Proof.cpp | 6 +++--- FHEOffline/Verifier.cpp | 4 ++-- Tools/random.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/FHEOffline/Proof.cpp b/FHEOffline/Proof.cpp index 33061b1f..11f01053 100644 --- a/FHEOffline/Proof.cpp +++ b/FHEOffline/Proof.cpp @@ -180,6 +180,6 @@ void Proof::Preimages::check_sizes() throw runtime_error("preimage sizes don't match"); } -template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; -template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; -template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; +template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; +template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; +template bool Proof::check_bounds(AddableVector>& z, AddableMatrix>& t, int i) const; diff --git a/FHEOffline/Verifier.cpp b/FHEOffline/Verifier.cpp index 454b64ff..fbea0c72 100644 --- a/FHEOffline/Verifier.cpp +++ b/FHEOffline/Verifier.cpp @@ -114,5 +114,5 @@ void Verifier::NIZKPoK(AddableVector& c, } -template class Verifier>; -template class Verifier>; +template class Verifier>; +template class Verifier>; diff --git a/Tools/random.cpp b/Tools/random.cpp index a231fb99..12244b34 100644 --- a/Tools/random.cpp +++ b/Tools/random.cpp @@ -243,7 +243,7 @@ void PRNG::randomBnd(bigint& x, const bigint& B, bool positive) } template<> -void PRNG::randomBnd(fixint<2>& x, const bigint& B, bool positive) +void PRNG::randomBnd(fixint& x, const bigint& B, bool positive) { randomBnd(bigint::tmp, B, positive); x = bigint::tmp; @@ -288,7 +288,7 @@ void PRNG::get(fixint<0>& res, int n_bits, bool positive) } template<> -void PRNG::get(fixint<2>& res, int n_bits, bool positive) +void PRNG::get(fixint& res, int n_bits, bool positive) { get(bigint::tmp, n_bits, positive); res = bigint::tmp;