1 #ifndef SIEVE_ECM_PP1_H_ 2 #define SIEVE_ECM_PP1_H_ 3 4 #include "modredc_ul.h" 5 #include "modredc_15ul.h" 6 #include "modredc_2ul2.h" 7 #include "mod_mpz.h" 8 #include "bytecode.h" 9 #include "stage2.h" 10 11 typedef struct { 12 bytecode bc; /* Bytecode for stage 1 */ 13 unsigned int exp2; /* Exponent of 2 in stage 1 primes */ 14 unsigned int B1; 15 stage2_plan_t stage2; 16 } pp1_plan_t; 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 23 int pp1_27_ul (modintredcul_t, const modulusredcul_t, const pp1_plan_t *); 24 int pp1_65_ul (modintredcul_t, const modulusredcul_t, const pp1_plan_t *); 25 int pp1_stage2_ul (residueredcul_t, const residueredcul_t, 26 const stage2_plan_t *, const residueredcul_t, 27 const modulusredcul_t); 28 29 int pp1_27_15ul (modintredc15ul_t, const modulusredc15ul_t, const pp1_plan_t *); 30 int pp1_65_15ul (modintredc15ul_t, const modulusredc15ul_t, const pp1_plan_t *); 31 int pp1_stage2_15ul (residueredc15ul_t, const residueredc15ul_t, 32 const stage2_plan_t *, const residueredc15ul_t, 33 const modulusredc15ul_t); 34 35 int pp1_27_2ul2 (modintredc2ul2_t, const modulusredc2ul2_t, const pp1_plan_t *); 36 int pp1_65_2ul2 (modintredc2ul2_t, const modulusredc2ul2_t, const pp1_plan_t *); 37 int pp1_stage2_2ul2 (residueredc2ul2_t, const residueredc2ul2_t, 38 const stage2_plan_t *, const residueredc2ul2_t, 39 const modulusredc2ul2_t); 40 41 int pp1_27_mpz (modintmpz_t, const modulusmpz_t, const pp1_plan_t *); 42 int pp1_65_mpz (modintmpz_t, const modulusmpz_t, const pp1_plan_t *); 43 int pp1_stage2_mpz (residuempz_t, const residuempz_t, 44 const stage2_plan_t *, const residuempz_t, 45 const modulusmpz_t); 46 void pp1_make_plan (pp1_plan_t *, const unsigned int, const unsigned int, int); 47 48 void pp1_clear_plan (pp1_plan_t *); 49 50 #ifdef __cplusplus 51 } 52 #endif 53 54 #endif /* SIEVE_ECM_PP1_H_ */ 55