X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/052b36d05a622a93733b735acce2de865b14627b..2685767a6125c1620719c7de6234aedf41857b7e:/pgen.h diff --git a/pgen.h b/pgen.h index 05d0a2c..459f360 100644 --- a/pgen.h +++ b/pgen.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pgen.h,v 1.5 2000/02/12 18:21:03 mdw Exp $ + * $Id: pgen.h,v 1.7 2000/08/18 19:16:12 mdw Exp $ * * Prime generation glue * @@ -30,6 +30,12 @@ /*----- Revision history --------------------------------------------------* * * $Log: pgen.h,v $ + * Revision 1.7 2000/08/18 19:16:12 mdw + * New event handler for showing in detail sub-prime generation. + * + * Revision 1.6 2000/06/17 11:52:12 mdw + * Add the GCD filter. + * * Revision 1.5 2000/02/12 18:21:03 mdw * Overhaul of key management (again). * @@ -219,6 +225,24 @@ typedef struct pgen_safetestctx { extern int pgen_safetest(int /*rq*/, pgen_event */*ev*/, void */*p*/); +/*----- Miscellaneous steppers and testers --------------------------------*/ + +typedef struct pgen_gcdstepctx { + pfilt p, jp; /* Prime filter and step filter */ + mp *q, *jq; /* %$p - 1$%, and a step value*/ + mp *r; /* Other argument for GCD */ + mp *g; /* GCD output (must be inited) */ + mp *max; /* Maximum permissible GCD */ +} pgen_gcdstepctx; + +/* --- @pgen_gcdstep@ --- * + * + * Steps @p@ and @q@, until @p@ has no small factors, and + * %$\gcd(p, r) \le max$%. + */ + +extern int pgen_gcdstep(int /*rq*/, pgen_event */*ev*/, void */*p*/); + /*----- Standard event handlers -------------------------------------------*/ /* --- @pgen_evspin@ --- * @@ -235,6 +259,13 @@ extern int pgen_evspin(int /*rq*/, pgen_event */*ev*/, void */*p*/); extern int pgen_ev(int /*rq*/, pgen_event */*ev*/, void */*p*/); +/* --- @pgen_subev@ --- * + * + * Subsidiary event handler, mainly for Lim-Lee searches and so on. + */ + +extern int pgen_subev(int /*rq*/, pgen_event */*ev*/, void */*p*/); + /*----- The main driver ---------------------------------------------------*/ /* --- @pgen@ --- *