[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.54 and 1.65

version 1.54, 2004/12/10 07:36:34 version 1.65, 2006/04/16 00:51:14
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.53 2004/12/02 13:48:43 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/include/ca.h,v 1.64 2006/03/16 10:08:21 noro Exp $
 */  */
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
Line 125  typedef void * pointer;
Line 125  typedef void * pointer;
 #define O_DPV 22  #define O_DPV 22
 #define O_QUOTEARG 23  #define O_QUOTEARG 23
 #define O_VOID -1  #define O_VOID -1
   /* IMAT */
   #define O_IMAT 24
   /* IMAT */
   #define O_NBP 25
   
 #define N_Q 0  #define N_Q 0
 #define N_R 1  #define N_R 1
Line 323  typedef struct oGF2MAT {
Line 327  typedef struct oGF2MAT {
         unsigned int **body;          unsigned int **body;
 } *GF2MAT, *GFMMAT;  } *GF2MAT, *GFMMAT;
   
   /* IMAT */
   #define IMATCH 64
   
   typedef struct oIENT {
           int cr;
           int row, col;
           pointer *body;
   } IENT;
   
   typedef struct oIMATC {
           pointer *fore;
           pointer *next;
           IENT ient[IMATCH];
   } *IMATC;
   
   typedef struct oIMAT {
           short id;
           int row, col, clen;
           pointer *root;
           pointer *toor;
   } *IMAT;
   /* IMAT */
 typedef struct oLIST {  typedef struct oLIST {
         short id;          short id;
         short pad;          short pad;
Line 419  typedef struct oTB {
Line 445  typedef struct oTB {
         char **body;          char **body;
 } *TB;  } *TB;
   
   typedef struct oNBP {
           short id;
           short pad;
           struct oNODE *body;
   } *NBP;
   
   /* non-commutative bivariate monomial */
   
   typedef struct oNBM {
           int d;
           P c;
           unsigned int *b;
   } *NBM;
   
   #define NEWNBM(p) ((p)=(NBM)MALLOC(sizeof(struct oNBM)))
   #define NEWNBMBDY(p,d) \
   ((p)->b=(unsigned int *)MALLOC((((d)+31)/32)*sizeof(unsigned int)))
   #define NEWNBP(p) ((p)=(NBP)MALLOC(sizeof(struct oNBP)),OID(p)=O_NBP)
   #define MKNBP(p,b) (NEWNBP(p),BDY(p)=(b))
   
   #define NBM_GET(a,j) (((a)[(j)>>5]&(1<<((j)&31)))?1:0)
   #define NBM_SET(a,j) ((a)[(j)>>5]|=(1<<((j)&31)))
   #define NBM_CLR(a,j) ((a)[(j)>>5]&=(~(1<<((j)&31))))
   
 typedef struct oObj {  typedef struct oObj {
         short id;          short id;
         short pad;          short pad;
Line 600  struct modorder_spec {
Line 650  struct modorder_spec {
   
 typedef struct oNumberField {  typedef struct oNumberField {
         int n;          int n;
           int psn;
         int dim;          int dim;
         VL vl;          VL vl;
         P *defpoly;          P *defpoly;
Line 788  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
Line 839  bzero((char *)(q)->b,(w)*sizeof(unsigned int)))
 #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)  #define NEWMAT(l) ((l)=(MAT)MALLOC(sizeof(struct oMAT)),OID(l)=O_MAT)
 #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)  #define NEWGF2MAT(l) ((l)=(GF2MAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GF2MAT)
 #define NEWGFMMAT(l) ((l)=(GFMMAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GFMMAT)  #define NEWGFMMAT(l) ((l)=(GFMMAT)MALLOC(sizeof(struct oGF2MAT)),OID(l)=O_GFMMAT)
   /* IMAT */
   #define NEWIMAT(l) ((l)=(IMAT)MALLOC(sizeof(struct oIMAT)),OID(l)=O_IMAT,l->clen=0,l->root=0,l->toor=0)
   #define NEWIENT(l) ((l)=(IMATC)MALLOC(sizeof(struct oIMATC)),l->fore=0,l->next=0)
   /* IMAT */
 #define NEWReal(q) ((q)=(Real)MALLOC_ATOMIC(sizeof(struct oReal)),OID(q)=O_N,NID(q)=N_R)  #define NEWReal(q) ((q)=(Real)MALLOC_ATOMIC(sizeof(struct oReal)),OID(q)=O_N,NID(q)=N_R)
 #define NEWAlg(r) ((r)=(Alg)MALLOC(sizeof(struct oAlg)),OID(r)=O_N,NID(r)=N_A)  #define NEWAlg(r) ((r)=(Alg)MALLOC(sizeof(struct oAlg)),OID(r)=O_N,NID(r)=N_A)
 #define NEWDAlg(r) ((r)=(DAlg)MALLOC(sizeof(struct oDAlg)),OID(r)=O_N,NID(r)=N_DA)  #define NEWDAlg(r) ((r)=(DAlg)MALLOC(sizeof(struct oDAlg)),OID(r)=O_N,NID(r)=N_DA)
Line 830  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
Line 885  DEG(DC(p))=ONE,COEF(DC(p))=(P)ONEM,NEXT(DC(p))=0)
 #define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b))  #define MKERR(e,b) (NEWERR(e),(e)->body=(Obj)(b))
 #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b))  #define MKMATHCAP(e,b) (NEWMATHCAP(e),(e)->body=(LIST)(b))
 #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=(unsigned 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 MKQUOTEARG(q,t,b) (NEWQUOTEARG(q),(q)->type=(t),(q)->body=(pointer)(b))
   
Line 901  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
Line 956  PL(NM(q))=1,BD(NM(q))[0]=(unsigned int)(n),DN(q)=0,(q)
 #define NUM(p) (OID(p)==O_N)  #define NUM(p) (OID(p)==O_N)
 #define RAT(p) (OID(p)==O_R)  #define RAT(p) (OID(p)==O_R)
 #define RATN(a) (NID(a)==N_Q)  #define RATN(a) (NID(a)==N_Q)
   #define POLY(a) (!(a) ||(OID(a)<=O_P))
 #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))  #define INT(q) (!(q)||(NUM(q)&&RATN((Num)q)&&!DN((Q)q)))
 #define REAL(a) (NID(a)==N_R)  #define REAL(a) (NID(a)==N_R)
 #define BIGFLOAT(a) (NID(a)==N_B)  #define BIGFLOAT(a) (NID(a)==N_B)
Line 993  extern const int sprime[];
Line 1049  extern const int sprime[];
 extern int sprime[];  extern int sprime[];
 #endif  #endif
   
 extern int lprime_size;  
 extern int *lprime;  
   
 extern void (*addnumt[])();  extern void (*addnumt[])();
 extern void (*subnumt[])();  extern void (*subnumt[])();
 extern void (*mulnumt[])();  extern void (*mulnumt[])();
Line 1266  void copyn(N,int,int *);
Line 1319  void copyn(N,int,int *);
 void kmulnmain(N,N,N *);  void kmulnmain(N,N,N *);
 int qcoefp(Obj);  int qcoefp(Obj);
 int qcoefr(Obj);  int qcoefr(Obj);
 int get_allocwords(void);  long get_allocwords(void);
 double get_clock(void);  double get_clock(void);
 void get_eg(struct oEGT *);  void get_eg(struct oEGT *);
 void printtime(struct oEGT *,struct oEGT *,double);  void printtime(struct oEGT *,struct oEGT *,double);
Line 2420  void resume_timer() ;
Line 2473  void resume_timer() ;
 void reset_engine() ;  void reset_engine() ;
 unsigned int get_asir_version() ;  unsigned int get_asir_version() ;
 char *get_asir_distribution();  char *get_asir_distribution();
 void create_error(ERR *err,unsigned int serial,char *msg);  void create_error(ERR *err,unsigned int serial,char *msg,LIST trace);
 void init_lprime();  void init_lprime();
 int get_lprime(int index);  int get_lprime(int index);
 void create_new_lprimes(int index);  void create_new_lprimes(int index);
Line 2532  int divtmp(VL vl,int mod,P p1,P p2,P *q);
Line 2585  int divtmp(VL vl,int mod,P p1,P p2,P *q);
 int divtdcmp(VL vl,int mod,P p1,P p2,P *q);  int divtdcmp(VL vl,int mod,P p1,P p2,P *q);
 void GC_gcollect();  void GC_gcollect();
   
   /* IMAT */
   void Pnewimat(NODE, IMAT *);
   void PChsgnI(NODE, IMAT *);
   void Pm2Im(NODE, IMAT *);
   void PIm2m(NODE, MAT *);
   
   void AddMatI(VL, IMAT, IMAT, IMAT *);
   void MulMatI(VL, IMAT, IMAT, IMAT *);
   void MulMatG(VL, Obj, Obj, Obj *);
   void MulrMatI(VL, Obj, Obj, Obj *);
   void MulMatS(VL, IMAT, IMAT, IMAT *);
   void PutIent(IMAT, int, int, Obj);
   void GetIent(IMAT, int, int, Obj);
   void GetIbody(IMAT, int, int, Obj *);
   void ChsgnI(IMAT, IMAT *c);
   void AppendIent(IMAT, int, int, Obj);
   void MEnt(int, int, int, Obj, IENT *);
   void GetForeIent(IMATC *, IENT *, int *);
   void GetNextIent(IMATC *, IENT *, int *);
   void SubMatI(VL, IMAT, IMAT, IMAT *);
   /* IMAT */
   
 Z stoz(int c);  Z stoz(int c);
 Z utoz(unsigned int c);  Z utoz(unsigned int c);
 Z qtoz(Q n);  Z qtoz(Q n);
Line 2558  void bzero(const void *,int);
Line 2633  void bzero(const void *,int);
 void bcopy(const void *,void *,int);  void bcopy(const void *,void *,int);
 char *index(char *,int);  char *index(char *,int);
 #endif  #endif
   
   void chsgnnbp(NBP p,NBP *rp);
   void subnbp(VL vl,NBP p1,NBP p2, NBP *rp);
   void addnbp(VL vl,NBP p1,NBP p2, NBP *rp);
   void mulnbp(VL vl,NBP p1,NBP p2, NBP *rp);
   void pwrnbp(VL vl,NBP p1,Q n, NBP *rp);
   int compnbp(VL vl,NBP p1,NBP p2);

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.65

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