=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/include/ca.h,v retrieving revision 1.36 retrieving revision 1.47 diff -u -p -r1.36 -r1.47 --- OpenXM_contrib2/asir2000/include/ca.h 2003/04/08 22:10:40 1.36 +++ OpenXM_contrib2/asir2000/include/ca.h 2004/03/09 08:02:01 1.47 @@ -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.35 2003/02/14 22:29:13 ohara Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.46 2004/03/03 09:25:30 noro Exp $ */ #include #include @@ -118,6 +118,10 @@ typedef void * pointer; #define O_GFMMAT 15 #define O_BYTEARRAY 16 #define O_QUOTE 17 +#define O_OPTLIST 18 +#define O_SYMBOL 19 +#define O_RANGE 20 +#define O_TB 21 #define O_VOID -1 #define N_Q 0 @@ -352,8 +356,35 @@ typedef struct oQUOTE { short id; short pad; pointer body; + struct oNODE *attr; } *QUOTE; +typedef struct oOPTLIST { + short id; + short pad; + struct oNODE *body; +} *OPTLIST; + +typedef struct oSYMBOL { + short id; + short pad; + char *name; + int value; +} *SYMBOL; + +typedef struct oRANGE { + short id; + short pad; + struct oObj *start,*end; +} *RANGE; + +typedef struct oTB { + short id; + short pad; + int size,next; + char **body; +} *TB; + typedef struct oObj { short id; short pad; @@ -419,6 +450,11 @@ typedef struct oDLBUCKET { struct oDLBUCKET *next; } *DLBUCKET; +typedef struct oGeoBucket { + int m; + struct oNODE *body[32]; +} *GeoBucket; + typedef struct oVL { V v; struct oVL *next; @@ -479,6 +515,26 @@ struct order_pair { int order, length; }; +struct sparse_weight { + int pos, value; +}; + +#define IS_DENSE_WEIGHT 0 +#define IS_SPARSE_WEIGHT 1 +#define IS_BLOCK 2 + +struct weight_or_block { + int type; + int length; + union { + int *dense_weight; + struct sparse_weight *sparse_weight; + struct { + int order, start; + } block; + } body; +}; + struct order_spec { int id; Obj obj; @@ -493,6 +549,10 @@ struct order_spec { int row; int **matrix; } matrix; + struct { + int length; + struct weight_or_block *w_or_b; + } composite; } ord; }; @@ -578,7 +638,7 @@ typedef unsigned int ModNum; #endif /* for setjmp/longjmp compatibility */ -#if defined(__CYGWIN__) +#if defined(__CYGWIN__) || defined(__x86_64) #define JMP_BUF sigjmp_buf #define SETJMP(x) sigsetjmp(x,~0) #define LONGJMP(x,y) siglongjmp(x,y) @@ -656,6 +716,10 @@ bzero((char *)(q)->b,(w)*sizeof(unsigned int))) #define NEWMATHCAP(e) ((e)=(MATHCAP)MALLOC(sizeof(struct oMATHCAP)),OID(e)=O_MATHCAP) #define NEWBYTEARRAY(e) ((e)=(BYTEARRAY)MALLOC(sizeof(struct oBYTEARRAY)),OID(e)=O_BYTEARRAY) #define NEWQUOTE(e) ((e)=(QUOTE)MALLOC(sizeof(struct oQUOTE)),OID(e)=O_QUOTE) +#define NEWOPTLIST(l) ((l)=(OPTLIST)MALLOC(sizeof(struct oOPTLIST)),OID(l)=O_OPTLIST) +#define NEWSYMBOL(l) ((l)=(SYMBOL)MALLOC(sizeof(struct oSYMBOL)),OID(l)=O_SYMBOL) +#define NEWRANGE(l) ((l)=(RANGE)MALLOC(sizeof(struct oRANGE)),OID(l)=O_RANGE) +#define NEWTB(l) ((l)=(TB)MALLOC(sizeof(struct oTB)),OID(l)=O_TB,(l)->size=256,(l)->next=0,(l)->body=(char **)MALLOC((l)->size*sizeof(char *))) #define NEWNODE(a) ((a)=(NODE)MALLOC(sizeof(struct oNODE))) #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP))) @@ -709,7 +773,7 @@ DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0) #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b)) #define MKBYTEARRAY(m,l) \ (NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(l))) -#define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b)) +#define MKQUOTE(q,b) (NEWQUOTE(q),(q)->body=(pointer)(b),(q)->attr=0) #define NEXTDC(r,c) \ if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);} @@ -850,6 +914,7 @@ extern VL CO,ALG; extern VL PVL; extern R ONER; extern Q ONE; +extern Q TWO; extern MQ ONEM; extern LM ONELM; extern N ONEN; @@ -975,6 +1040,7 @@ void square_rem_tab_up_gf2n(UP,UP *,UP *); void powertabup_gf2n(UP,UP,UP *); void find_root_gf2n(UP,GF2N *); +int cmpdl_composite(int,DL,DL); int cmpdl_matrix(int,DL,DL); int cmpdl_order_pair(int,DL,DL); int cmpdl_elim(int,DL,DL); @@ -1432,6 +1498,7 @@ void dtestroot(int,int,P,LUM,struct oDUM *,DCP *); void dtestroot1(int,int,P,LUM,P *); void dtestsq(int,int,P,LUM,P *); void dtestsql(P,ML,struct oDUM *,DCP *); +void ediffp(VL,P,V,P *); void estimatelc(VL,Q,DCP,VN,P *); void eucum(register int,UM,UM,UM,UM); void exthp(VL,P,int,P *);