[BACK]Return to ca.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / include

Diff for /OpenXM_contrib2/asir2000/include/ca.h between version 1.36 and 1.50

version 1.36, 2003/04/08 22:10:40 version 1.50, 2004/07/13 07:59:53
Line 45 
Line 45 
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * 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.49 2004/05/14 06:02:54 noro Exp $
 */  */
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 118  typedef void * pointer;
Line 118  typedef void * pointer;
 #define O_GFMMAT 15  #define O_GFMMAT 15
 #define O_BYTEARRAY 16  #define O_BYTEARRAY 16
 #define O_QUOTE 17  #define O_QUOTE 17
   #define O_OPTLIST 18
   #define O_SYMBOL 19
   #define O_RANGE 20
   #define O_TB 21
   #define O_DPV 22
   #define O_QUOTEARG 23
 #define O_VOID -1  #define O_VOID -1
   
 #define N_Q 0  #define N_Q 0
Line 136  typedef void * pointer;
Line 142  typedef void * pointer;
 #define ORD_GRADLEX 1  #define ORD_GRADLEX 1
 #define ORD_LEX 2  #define ORD_LEX 2
   
   typedef enum {
           A_end=0,A_fnode,A_arf,A_int,A_str,A_internal,A_node,A_notimpl,A_func
   } farg_type;
   
 #if defined(LONG_IS_32BIT)  #if defined(LONG_IS_32BIT)
 #if defined(VISUAL)  #if defined(VISUAL)
 typedef _int64 L;  typedef _int64 L;
Line 323  typedef struct oDP {
Line 333  typedef struct oDP {
         struct oMP *body;          struct oMP *body;
 } *DP;  } *DP;
   
   typedef struct oDPV {
           short id;
           int len;
           int sugar;
           struct oDP **body;
   } *DPV;
   
 typedef struct oUSINT {  typedef struct oUSINT {
         short id;          short id;
         short pad;          short pad;
Line 354  typedef struct oQUOTE {
Line 371  typedef struct oQUOTE {
         pointer body;          pointer body;
 } *QUOTE;  } *QUOTE;
   
   typedef struct oQUOTEARG {
           short id;
           short pad;
           farg_type type;
           pointer body;
   } *QUOTEARG;
   
   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 {  typedef struct oObj {
         short id;          short id;
         short pad;          short pad;
Line 419  typedef struct oDLBUCKET {
Line 469  typedef struct oDLBUCKET {
         struct oDLBUCKET *next;          struct oDLBUCKET *next;
 } *DLBUCKET;  } *DLBUCKET;
   
   typedef struct oGeoBucket {
           int m;
           struct oNODE *body[32];
   } *GeoBucket;
   
 typedef struct oVL {  typedef struct oVL {
         V v;          V v;
         struct oVL *next;          struct oVL *next;
Line 479  struct order_pair {
Line 534  struct order_pair {
         int order, length;          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 {  struct order_spec {
         int id;          int id;
         Obj obj;          Obj obj;
Line 493  struct order_spec {
Line 568  struct order_spec {
                         int row;                          int row;
                         int **matrix;                          int **matrix;
                 } matrix;                  } matrix;
                   struct {
                           int length;
                           struct weight_or_block *w_or_b;
                   } composite;
         } ord;          } ord;
 };  };
   
   struct modorder_spec {
           /* id : ORD_REVGRADLEX, ORD_GRADLEX, ORD_LEX */
           int id;
           Obj obj;
           int len;
           int *degree_shift;
   };
   
 /* structure for cputime */  /* structure for cputime */
   
 struct oEGT {  struct oEGT {
Line 578  typedef unsigned int ModNum;
Line 665  typedef unsigned int ModNum;
 #endif  #endif
   
 /* for setjmp/longjmp compatibility */  /* for setjmp/longjmp compatibility */
 #if defined(__CYGWIN__)  #if defined(__CYGWIN__) || defined(__x86_64)
 #define JMP_BUF sigjmp_buf  #define JMP_BUF sigjmp_buf
 #define SETJMP(x) sigsetjmp(x,~0)  #define SETJMP(x) sigsetjmp(x,~0)
 #define LONGJMP(x,y) siglongjmp(x,y)  #define LONGJMP(x,y) siglongjmp(x,y)
Line 651  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
Line 738  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
 #define NEWSTR(l) ((l)=(STRING)MALLOC(sizeof(struct oSTRING)),OID(l)=O_STR)  #define NEWSTR(l) ((l)=(STRING)MALLOC(sizeof(struct oSTRING)),OID(l)=O_STR)
 #define NEWCOMP(c,n) ((c)=(COMP)MALLOC(sizeof(struct oCOMP)+((n)-1)*sizeof(Obj)),OID(c)=O_COMP)  #define NEWCOMP(c,n) ((c)=(COMP)MALLOC(sizeof(struct oCOMP)+((n)-1)*sizeof(Obj)),OID(c)=O_COMP)
 #define NEWDP(d) ((d)=(DP)MALLOC(sizeof(struct oDP)),OID(d)=O_DP)  #define NEWDP(d) ((d)=(DP)MALLOC(sizeof(struct oDP)),OID(d)=O_DP)
   #define NEWDPV(d) ((d)=(DPV)MALLOC(sizeof(struct oDPV)),OID(d)=O_DPV)
 #define NEWUSINT(u) ((u)=(USINT)MALLOC_ATOMIC(sizeof(struct oUSINT)),OID(u)=O_USINT)  #define NEWUSINT(u) ((u)=(USINT)MALLOC_ATOMIC(sizeof(struct oUSINT)),OID(u)=O_USINT)
 #define NEWERR(e) ((e)=(ERR)MALLOC(sizeof(struct oERR)),OID(e)=O_ERR)  #define NEWERR(e) ((e)=(ERR)MALLOC(sizeof(struct oERR)),OID(e)=O_ERR)
 #define NEWMATHCAP(e) ((e)=(MATHCAP)MALLOC(sizeof(struct oMATHCAP)),OID(e)=O_MATHCAP)  #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 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 NEWQUOTE(e) ((e)=(QUOTE)MALLOC(sizeof(struct oQUOTE)),OID(e)=O_QUOTE)
   #define NEWQUOTEARG(e) ((e)=(QUOTEARG)MALLOC(sizeof(struct oQUOTEARG)),OID(e)=O_QUOTEARG)
   #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 NEWNODE(a) ((a)=(NODE)MALLOC(sizeof(struct oNODE)))
 #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP)))  #define NEWDC(dc) ((dc)=(DCP)MALLOC(sizeof(struct oDCP)))
Line 701  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
Line 794  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
 #define TOGFMMAT(r,c,b,m) (NEWGFMMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))  #define TOGFMMAT(r,c,b,m) (NEWGFMMAT(m),(m)->row=(r),(m)->col=(c),(m)->body=(b))
 #define MKSTR(a,b) (NEWSTR(a),(a)->body=(char *)(b))  #define MKSTR(a,b) (NEWSTR(a),(a)->body=(char *)(b))
 #define MKDP(n,m,d) (NEWDP(d),(d)->nv=(n),BDY(d)=(m))  #define MKDP(n,m,d) (NEWDP(d),(d)->nv=(n),BDY(d)=(m))
   #define MKDPV(len,m,d) (NEWDPV(d),(d)->len=(len),BDY(d)=(m))
 #define MKLM(b,l) (!(b)?(l)=0:(NEWLM(l),(l)->body=(b),(l)))  #define MKLM(b,l) (!(b)?(l)=0:(NEWLM(l),(l)->body=(b),(l)))
 #define MKGF2N(b,l) (!(b)?(l)=0:(NEWGF2N(l),(l)->body=(b),(l)))  #define MKGF2N(b,l) (!(b)?(l)=0:(NEWGF2N(l),(l)->body=(b),(l)))
 #define MKGFPN(b,l) (!(b)?(l)=0:(NEWGFPN(l),(l)->body=(b),(l)))  #define MKGFPN(b,l) (!(b)?(l)=0:(NEWGFPN(l),(l)->body=(b),(l)))
Line 710  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
Line 804  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
 #define MKBYTEARRAY(m,l) \  #define MKBYTEARRAY(m,l) \
 (NEWBYTEARRAY(m),(m)->len=(l),(m)->body=(char *)MALLOC_ATOMIC((l)),bzero((m)->body,(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))
   #define MKQUOTEARG(q,t,b) (NEWQUOTEARG(q),(q)->type=(t),(q)->body=(pointer)(b))
   
 #define NEXTDC(r,c) \  #define NEXTDC(r,c) \
 if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);}  if(!(r)){NEWDC(r);(c)=(r);}else{NEWDC(NEXT(c));(c)=NEXT(c);}
Line 850  extern VL CO,ALG;
Line 945  extern VL CO,ALG;
 extern VL PVL;  extern VL PVL;
 extern R ONER;  extern R ONER;
 extern Q ONE;  extern Q ONE;
   extern Q TWO;
 extern MQ ONEM;  extern MQ ONEM;
 extern LM ONELM;  extern LM ONELM;
 extern N ONEN;  extern N ONEN;
Line 975  void square_rem_tab_up_gf2n(UP,UP *,UP *);
Line 1071  void square_rem_tab_up_gf2n(UP,UP *,UP *);
 void powertabup_gf2n(UP,UP,UP *);  void powertabup_gf2n(UP,UP,UP *);
 void find_root_gf2n(UP,GF2N *);  void find_root_gf2n(UP,GF2N *);
   
   int cmpdl_composite(int,DL,DL);
 int cmpdl_matrix(int,DL,DL);  int cmpdl_matrix(int,DL,DL);
 int cmpdl_order_pair(int,DL,DL);  int cmpdl_order_pair(int,DL,DL);
 int cmpdl_elim(int,DL,DL);  int cmpdl_elim(int,DL,DL);
Line 1003  void dtop(VL,VL,DP,P *);
Line 1100  void dtop(VL,VL,DP,P *);
 void ptod(VL,VL,P,DP *);  void ptod(VL,VL,P,DP *);
 void initd(struct order_spec *);  void initd(struct order_spec *);
   
   void adddv(VL,DPV,DPV,DPV *);
   void subdv(VL,DPV,DPV,DPV *);
   void muldv(VL,DP,DPV,DPV *);
   void chsgndv(DPV,DPV *);
   int compdv(VL,DPV,DPV);
   
 void _printdp(DP);  void _printdp(DP);
 void _dp_sp_mod(DP,DP,int,DP *);  void _dp_sp_mod(DP,DP,int,DP *);
 void _dp_mod(DP,int,NODE,DP *);  void _dp_mod(DP,int,NODE,DP *);
Line 1432  void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
Line 1535  void dtestroot(int,int,P,LUM,struct oDUM *,DCP *);
 void dtestroot1(int,int,P,LUM,P *);  void dtestroot1(int,int,P,LUM,P *);
 void dtestsq(int,int,P,LUM,P *);  void dtestsq(int,int,P,LUM,P *);
 void dtestsql(P,ML,struct oDUM *,DCP *);  void dtestsql(P,ML,struct oDUM *,DCP *);
   void ediffp(VL,P,V,P *);
 void estimatelc(VL,Q,DCP,VN,P *);  void estimatelc(VL,Q,DCP,VN,P *);
 void eucum(register int,UM,UM,UM,UM);  void eucum(register int,UM,UM,UM,UM);
 void exthp(VL,P,int,P *);  void exthp(VL,P,int,P *);

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.50

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>