Class Sieve03gU

  • All Implemented Interfaces:
    Sieve

    public class Sieve03gU
    extends Object
    implements Sieve
    Derivative of Sieve03g holding the sieve array in native memory. Both the sieve core and the collect phase are notably faster than in Sieve03g !
    Author:
    Tilman Neumann
    • Constructor Detail

      • Sieve03gU

        public Sieve03gU()
    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface Sieve
        Returns:
        the name of this sieve algorithm
      • initializeForN

        public void initializeForN​(SieveParams sieveParams,
                                   int mergedBaseSize)
        Description copied from interface: Sieve
        Initialize for a new N. In PSIQS, this method is called for each thread, so things that can be computed before should be computed before.
        Specified by:
        initializeForN in interface Sieve
        Parameters:
        sieveParams - basic sieve parameters for a new N
        mergedBaseSize - size of prime/power base after merging, before filtering
      • initializeForAParameter

        public void initializeForAParameter​(SolutionArrays solutionArrays,
                                            int filteredBaseSize)
        Description copied from interface: Sieve
        Set (filtered) prime base and smallest x1, x2 solutions for a new a-parameter.
        Specified by:
        initializeForAParameter in interface Sieve
        filteredBaseSize - number of primes and powers use for sieving
      • sieve

        public List<Integer> sieve()
        Description copied from interface: Sieve
        Sieve for a new set of x1, x2 solutions.
        Specified by:
        sieve in interface Sieve
        Returns:
        list of sieve locations x where Q(x) is smooth enough to be passed to trial division
      • getReport

        public SieveReport getReport()
        Specified by:
        getReport in interface Sieve
        Returns:
        description of the durations of the individual sub-phases
      • cleanUp

        public void cleanUp()
        Description copied from interface: Sieve
        Release memory after a factorization.
        Specified by:
        cleanUp in interface Sieve