=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/include/ca.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -p -r1.15 -r1.16 --- OpenXM_contrib2/asir2000/include/ca.h 2001/06/20 09:30:34 1.15 +++ OpenXM_contrib2/asir2000/include/ca.h 2001/06/25 01:35:22 1.16 @@ -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.14 2001/06/07 04:54:41 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.15 2001/06/20 09:30:34 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,22 @@ 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,(n),UM));\ + DEG(___q___) = n;\ + ___c___ = (UM *)COEF(___q___);\ + for ( ___i___ = 0; ___i___ <= n; ___i___++ ) {\ + ___c___[___i___] = W_UMALLOC(bound);\ + DEG(___c___[___i___]) = -1\ + bzero((char *)COEF(___c___[___i___]),((bound)+1)*sizeof(int));\ + }\ + (p) = ___q___;\ +} + #define NEWUP2(q,w)\ ((q)=(UP2)MALLOC_ATOMIC(TRUESIZE(oUP2,(w)-1,unsigned int)),\ bzero((char *)(q)->b,(w)*sizeof(unsigned int))) @@ -1095,6 +1120,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);