示例#1
0
from multiprocessing import Queue, Pipe, Process, active_children

from fpylll import IntegerMatrix, GSO, FPLLL, BKZ
from fpylll.tools.bkz_stats import BKZTreeTracer
from fpylll.fplll.bkz_param import Strategy, dump_strategies_json

from strategizer.bkz import CallbackBKZ
from strategizer.bkz import CallbackBKZParam as Param
from strategizer.config import logging, git_revision
from strategizer.util import chunk_iterator
from strategizer.strategizers import PruningStrategizer,\
    OneTourPreprocStrategizerFactory, \
    TwoTourPreprocStrategizerFactory, \
    FourTourPreprocStrategizerFactory, \
    ProgressivePreprocStrategizerFactory
logger = logging.getLogger(__name__)


def find_best(state, fudge=1.01):
    """
    Given an ordered tuple of tuples, return the minimal one, where
    minimal is determined by first entry.

    :param state:
    :param fudge:


    .. note :: The fudge factor means that we have a bias towards earlier entries.
    """
    best = state[0]
    for s in state:
示例#2
0
# -*- coding: utf-8 -*-
u"""
.. moduleauthor:: Martin R.  Albrecht <*****@*****.**>
.. moduleauthor:: Léo Ducas  <*****@*****.**>
.. moduleauthor:: Marc Stevens  <*****@*****.**>
"""

import pickle
from fpylll.tools.benchmark import bench_enumeration
from strategizer.config import logging
logger = logging.getLogger(__name__)

nodes, time = bench_enumeration(55)
logger.info("  fplll :: nodes: %12.1f, time: %6.4fs, nodes/s: %12.1f" %
            (nodes, time, nodes / time))

f = open("mdc.data", "wb")
pickle.dump(nodes / time, f)
f.close()
示例#3
0
from multiprocessing import Queue, Pipe, Process, active_children

from fpylll import IntegerMatrix, GSO, FPLLL, BKZ
from fpylll.tools.bkz_stats import BKZTreeTracer
from fpylll.fplll.bkz_param import Strategy, dump_strategies_json

from strategizer.bkz import CallbackBKZ
from strategizer.bkz import CallbackBKZParam as Param
from strategizer.config import logging, git_revision
from strategizer.util import chunk_iterator
from strategizer.strategizers import PruningStrategizer,\
    OneTourPreprocStrategizerFactory, \
    TwoTourPreprocStrategizerFactory, \
    FourTourPreprocStrategizerFactory, \
    ProgressivePreprocStrategizerFactory
logger = logging.getLogger(__name__)


def find_best(state, fudge=1.01):
    """
    Given an ordered tuple of tuples, return the minimal one, where
    minimal is determined by first entry.

    :param state:
    :param fudge:


    .. note :: The fudge factor means that we have a bias towards earlier entries.
    """
    best = state[0]
    for s in state:
示例#4
0
# -*- coding: utf-8 -*-
u"""
.. moduleauthor:: Martin R.  Albrecht <*****@*****.**>
.. moduleauthor:: Léo Ducas  <*****@*****.**>
.. moduleauthor:: Marc Stevens  <*****@*****.**>
"""

import pickle
from fpylll.tools.benchmark import bench_enumeration
from strategizer.config import logging
logger = logging.getLogger(__name__)

nodes, time = bench_enumeration(44)
logger.info("  fplll :: nodes: %12.1f, time: %6.4fs, nodes/s: %12.1f"%(nodes, time, nodes/time))

f = open("mdc.data", "wb")
pickle.dump(nodes/time, f)
f.close()