Skip to content

Commit

Permalink
Merge pull request #346 from fplll/minor_fix_sieve
Browse files Browse the repository at this point in the history
minor fix sieve outputs and template inst.
  • Loading branch information
malb committed Jun 12, 2018
2 parents 1a8ba26 + cb49f85 commit 21c1a6d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions fplll/sieve/sampler_basic.cpp
Expand Up @@ -155,4 +155,9 @@ template <class ZT, class F> NumVect<Z_NR<ZT>> KleinSampler<ZT, F>::sample()

template class KleinSampler<long, FP_NR<double>>;
template class KleinSampler<mpz_t, FP_NR<double>>;
#ifdef FPLLL_WITH_QD
template class KleinSampler<long, FP_NR<dd_real>>;
template class KleinSampler<mpz_t, FP_NR<dd_real>>;
#endif
template class KleinSampler<long, FP_NR<mpfr_t>>;
template class KleinSampler<mpz_t, FP_NR<mpfr_t>>;
14 changes: 8 additions & 6 deletions fplll/sieve/sieve_gauss.cpp
Expand Up @@ -292,15 +292,11 @@ template <class ZT, class F> void GaussSieve<ZT, F>::print_final_info()
cout << "# [info] max(|L|)=" << max_list_size;
cout << " log2(max|L|)/n=" << log2(max_list_size) / nc << endl;
cout << "# [info] true max|L| = " << first_size << endl;
;
cout << "# [info] true log2(max|L|)/n = " << log2(first_size) / nc << endl;
cout << "# [info] sv is" << endl;
}
if (verbose)
{
final_norm.set_z(best_sqr_norm);
final_norm.sqrt(final_norm, GMP_RNDN);
cout << "# [info] |sv| = " << final_norm << " (" << best_sqr_norm << ")" << endl;
cout << "# [info] shortest vector is " << endl << return_first() << endl;
}
}

Expand All @@ -320,7 +316,13 @@ template <class ZT, class F> bool GaussSieve<ZT, F>::sieve(Z_NR<ZT> target_norm)
return run_2sieve();
}

template class GaussSieve<mpz_t, FP_NR<double>>;
template class GaussSieve<long, FP_NR<double>>;
template class GaussSieve<mpz_t, FP_NR<double>>;
#ifdef FPLLL_WITH_QD
template class GaussSieve<long, FP_NR<dd_real>>;
template class GaussSieve<mpz_t, FP_NR<dd_real>>;
#endif
template class GaussSieve<long, FP_NR<mpfr_t>>;
template class GaussSieve<mpz_t, FP_NR<mpfr_t>>;

FPLLL_END_NAMESPACE
2 changes: 1 addition & 1 deletion fplll/sieve/sieve_main.cpp
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char **argv)
{
char *input_file_name = NULL;
char *target_norm_s = NULL;
bool flag_verbose = false, flag_file = false;
bool flag_verbose = true, flag_file = false;
int option, alg, dim = 10, seed = 0, bs = 0;

#if 0
Expand Down

0 comments on commit 21c1a6d

Please sign in to comment.