=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/include/ca.h,v retrieving revision 1.14 retrieving revision 1.17 diff -u -p -r1.14 -r1.17 --- OpenXM_contrib2/asir2000/include/ca.h 2001/06/07 04:54:41 1.14 +++ OpenXM_contrib2/asir2000/include/ca.h 2001/06/25 04:11:43 1.17 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.13 2001/04/20 02:34:22 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.16 2001/06/25 01:35:22 noro Exp $ */ #include @@ -370,16 +370,25 @@ typedef struct oNODE { struct oNODE *next; } *NODE; +/* univariate poly over small finite field; dense */ typedef struct oUM { int d; int c[1]; } *UM; +/* univariate poly with padic coeff */ typedef struct oLUM { int d; int *c[1]; } *LUM; +/* bivariate poly over small finite field; dense */ + +typedef struct oBM { + int d; + UM c[1]; +} *BM; + typedef struct oML { int n; int mod; @@ -529,6 +538,21 @@ bzero((char *)(p),(int)(((n)+1)*sizeof(type)))) (p) = ___q___;\ } +#define W_BMALLOC(n,bound,p)\ +{\ + BM ___q___;\ + int ___i___;\ + UM *___c___;\ + (___q___) = (BM)ALLOCA(TRUESIZE(oBM,(bound),UM));\ + DEG(___q___) = bound;\ + ___c___ = (UM *)COEF(___q___);\ + for ( ___i___ = 0; ___i___ < bound; ___i___++ ) {\ + ___c___[___i___] = W_UMALLOC(n);\ + clearum(___c___[___i___],n);\ + }\ + (p) = ___q___;\ +} + #define NEWUP2(q,w)\ ((q)=(UP2)MALLOC_ATOMIC(TRUESIZE(oUP2,(w)-1,unsigned int)),\ bzero((char *)(q)->b,(w)*sizeof(unsigned int))) @@ -677,6 +701,11 @@ PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q) #define ITOS(p) (((unsigned int)(p))&0x7fffffff) #define STOI(i) ((P)((unsigned int)(i)|0x80000000)) +/* immediate GFS representation */ + +#define IFTOF(p) ((int)(((unsigned int)(p))&0x7fffffff)) +#define FTOIF(i) ((int)(((unsigned int)(i)|0x80000000))) + struct cdl { P c; DL d; @@ -1090,6 +1119,7 @@ int int_bits(int); LUM LUMALLOC(int, int); +BM BMALLOC(int, int); Obj ToAlg(Num); UM *berlemain(register int, UM, UM *); void *Risa_GC_malloc(size_t);