42 typedef fftRep fftrep;
43 typedef zz_pContext zpContext;
44 typedef zz_pBak zpBak;
45 typedef zz_pXModulus zpxModulus;
59 typedef FFTRep fftrep;
60 typedef ZZ_pContext zpContext ;
61 typedef ZZ_pBak zpBak;
62 typedef ZZ_pXModulus zpxModulus;
65 #define INJECT_TYPE(type,subtype) typedef typename type::subtype subtype
92 INJECT_TYPE(type,zpx);
93 INJECT_TYPE(type,zzv);
94 INJECT_TYPE(type,fftrep);
95 INJECT_TYPE(type,zpContext);
96 INJECT_TYPE(type,zpBak);
97 INJECT_TYPE(type,zpxModulus);
110 mutable Vec<mulmod_precon_t> powers_aux;
112 mutable fftrep_aux Rb_aux;
116 mutable Vec<mulmod_precon_t> ipowers_aux;
118 mutable fftrep_aux iRb_aux;
124 void privateInit(
const PAlgebra&,
const zz& rt);
128 if (powers!=NULL) {
delete powers; powers=NULL; }
129 if (Rb!=NULL) {
delete Rb; Rb=NULL; }
130 if (Ra!=NULL) {
delete Ra; Ra=NULL; }
131 if (ipowers!=NULL) {
delete ipowers; ipowers=NULL; }
132 if (iRb!=NULL) {
delete iRb; iRb = NULL; }
133 if (phimx!=NULL) {
delete phimx; phimx = NULL; }
134 if (scratch!=NULL) {
delete scratch; scratch = NULL; }
141 ~
Cmod() { freeSpace(); }
144 Cmod(): zMStar(NULL), powers(NULL), Rb(NULL), Ra(NULL), ipowers(NULL), iRb(NULL),
145 phimx(NULL), scratch(NULL) {}
148 zMStar(NULL),powers(NULL),Rb(NULL),Ra(NULL),ipowers(NULL),iRb(NULL),phimx(NULL),scratch(NULL)
159 const PAlgebra &getZMStar()
const {
return *zMStar; }
160 unsigned getM()
const {
return zMStar->
getM(); }
161 unsigned getPhiM()
const {
return zMStar->
getPhiM(); }
162 const zz& getQ()
const {
return q; }
163 const zz& getRoot()
const {
return root; }
164 const zpxModulus& getPhimX()
const {
return *phimx; }
165 zpx& getScratch()
const {
return *scratch; }
173 void FFT(zzv &y,
const ZZX& x)
const;
176 void iFFT(zpx &x,
const zzv& y)
const;
182 #endif // ifdef _CModulus_H_