Skip to content

Commit

Permalink
remove dsvp_postprocessing which was removed upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
malb committed Jul 13, 2017
1 parent 29af092 commit 1713aab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 71 deletions.
70 changes: 0 additions & 70 deletions src/fpylll/fplll/bkz.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -360,76 +360,6 @@ cdef class BKZReduction:

return bool(r)

def dsvp_postprocessing(self, int kappa, int block_size, tuple solution):
"""Insert solution into basis after Dual-SVP oracle call
:param kappa: index
:param block_size: block size
:param solution: solution to insert
"""
cdef vector_fp_nr_t solution_
cdef fp_nr_t t

if kappa < 0 or kappa >= self.M.d:
raise ValueError("kappa %d out of bounds (0, %d)"%(kappa, self.M.d))
if block_size < 2 or block_size > self.M.d:
raise ValueError("block size %d out of bounds (2, %d)"%(block_size, self.M.d))

r = True

if self._type == gso_mpz_d:
for s in solution:
t.d = float(s)
solution_.d.push_back(t.d)
sig_on()
r = self._core.mpz_d.dsvp_postprocessing(kappa, block_size, solution_.d)
sig_off()
elif self._type == gso_mpz_ld:
IF HAVE_LONG_DOUBLE:
for s in solution:
t.ld = float(s)
solution_.ld.push_back(t.ld)
sig_on()
r = self._core.mpz_ld.dsvp_postprocessing(kappa, block_size, solution_.ld)
sig_off()
ELSE:
raise RuntimeError("BKZAutoAbort object '%s' has no core."%self)
elif self._type == gso_mpz_dpe:
for s in solution:
t.dpe = float(s)
solution_.dpe.push_back(t.dpe)
sig_on()
r = self._core.mpz_dpe.dsvp_postprocessing(kappa, block_size, solution_.dpe)
sig_off()
elif self._type == gso_mpz_mpfr:
for s in solution:
t.mpfr = float(s)
solution_.mpfr.push_back(t.mpfr)
sig_on()
r= self._core.mpz_mpfr.dsvp_postprocessing(kappa, block_size, solution_.mpfr)
sig_off()
else:
IF HAVE_QD:
if self._type == gso_mpz_dd:
for s in solution:
t.dd = float(s)
solution_.dd.push_back(t.dd)
sig_on()
r = self._core.mpz_dd.dsvp_postprocessing(kappa, block_size, solution_.dd)
sig_off()
elif self._type == gso_mpz_qd:
for s in solution:
t.qd = float(s)
solution_.qd.push_back(t.qd)
sig_on()
r = self._core.mpz_qd.dsvp_postprocessing(kappa, block_size, solution_.qd)
sig_off()
else:
raise RuntimeError("BKZReduction object '%s' has no core."%self)

return bool(r)

def svp_reduction(self, int kappa, int block_size, BKZParam param, dual=False):
"""Run (Dual-)SVP reduction (incl. pre and postprocessing)
Expand Down
1 change: 0 additions & 1 deletion src/fpylll/fplll/fplll.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ cdef extern from "fplll/bkz.h" namespace "fplll":

int svp_preprocessing(int kappa, int block_size, const BKZParam &param) nogil
int svp_postprocessing(int kappa, int block_size, const vector[FT] &solution) nogil
int dsvp_postprocessing(int kappa, int block_size, const vector[FT] &solution) nogil

int svp_reduction(int kappa, int block_size, const BKZParam &param, int dual) nogil except +

Expand Down

0 comments on commit 1713aab

Please sign in to comment.