Changeset 900802 in git


Ignore:
Timestamp:
Jan 27, 2010, 12:26:35 PM (13 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
Children:
9c4865b7cda2bf45bae975154676503fdfcbf15e
Parents:
4c4a8025d5593bc6f5fd2950cfac144eb2d79cd3
Message:
structs.h cleanup

git-svn-id: file:///usr/local/Singular/svn/trunk@12460 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/ffields.cc

    r4c4a80 r900802  
    2020int nfCharP=0;  /* the characteristic: p*/
    2121static int nfCharQ1=0; /* q-1 */
    22 CARDINAL *nfPlus1Table=NULL; /* the table i=log(z^i) -> log(z^i+1) */
     22unsigned short *nfPlus1Table=NULL; /* the table i=log(z^i) -> log(z^i+1) */
    2323/* the q's from the table 'fftable' */
    2424unsigned short fftable[]={
     
    166166  while (i >= nfCharP) i -= nfCharP;
    167167  if (i==0) return (number)(long)nfCharQ;
    168   CARDINAL c=0;
     168  unsigned short c=0;
    169169  while (i>1)
    170170  {
     
    592592  if (nfCharQ > 1)
    593593  {
    594     omFreeSize( (ADDRESS)nfPlus1Table,nfCharQ*sizeof(CARDINAL) );
     594    omFreeSize( (ADDRESS)nfPlus1Table,nfCharQ*sizeof(unsigned short) );
    595595    nfPlus1Table=NULL;
    596596  }
     
    620620    nfCharQ1=nfCharQ-1;
    621621    //Print("nfCharQ=%d,nfCharQ1=%d,mipo=>>%s<<\n",nfCharQ,nfCharQ1,buf);
    622     nfPlus1Table= (CARDINAL *)omAlloc( (nfCharQ)*sizeof(CARDINAL) );
     622    nfPlus1Table= (unsigned short *)omAlloc( (nfCharQ)*sizeof(unsigned short) );
    623623    int digs = gf_tab_numdigits62( nfCharQ );
    624624    char * bufptr;
  • kernel/hdegree.cc

    r4c4a80 r900802  
    2121
    2222int  hCo, hMu, hMu2;
     23struct omBin_s* indlist_bin = omGetSpecBin(sizeof(indlist));
    2324
    2425/*0 implementation*/
  • kernel/hutil.h

    r4c4a80 r900802  
    1818  scfmon mo;
    1919  int a;
     20};
     21
     22typedef struct sindlist indlist;
     23typedef indlist * indset;
     24struct sindlist
     25{
     26  indset nx;
     27  intvec * set;
    2028};
    2129
  • kernel/longalg.cc

    r4c4a80 r900802  
    2727
    2828naIdeal naI=NULL;
     29
     30omBin snaIdeal_bin = omGetSpecBin(sizeof(snaIdeal));
    2931
    3032int naNumbOfPar;
  • kernel/misc.cc

    r4c4a80 r900802  
    4848
    4949omBin char_ptr_bin = omGetSpecBin(sizeof(char_ptr));
    50 omBin indlist_bin = omGetSpecBin(sizeof(indlist));
    51 omBin naIdeal_bin = omGetSpecBin(sizeof(naIdeal));
    52 omBin snaIdeal_bin = omGetSpecBin(sizeof(snaIdeal));
    5350omBin smprec_bin = omGetSpecBin(sizeof(smprec));
    5451omBin sip_sring_bin = omGetSpecBin(sizeof(sip_sring));
  • kernel/modulop.cc

    r4c4a80 r900802  
    2828
    2929#ifdef HAVE_DIV_MOD
    30 CARDINAL *npInvTable=NULL;
     30unsigned short *npInvTable=NULL;
    3131#endif
    3232
    3333#if !defined(HAVE_DIV_MOD) || !defined(HAVE_MULT_MOD)
    34 CARDINAL *npExpTable=NULL;
    35 CARDINAL *npLogTable=NULL;
     34unsigned short *npExpTable=NULL;
     35unsigned short *npLogTable=NULL;
    3636#endif
    3737
     
    350350    {
    351351#if !defined(HAVE_DIV_MOD) || !defined(HAVE_MULT_MOD)
    352       r->cf->npExpTable=(CARDINAL *)omAlloc( r->cf->npPrimeM*sizeof(CARDINAL) );
    353       r->cf->npLogTable=(CARDINAL *)omAlloc( r->cf->npPrimeM*sizeof(CARDINAL) );
     352      r->cf->npExpTable=(unsigned short *)omAlloc( r->cf->npPrimeM*sizeof(unsigned short) );
     353      r->cf->npLogTable=(unsigned short *)omAlloc( r->cf->npPrimeM*sizeof(unsigned short) );
    354354      r->cf->npExpTable[0] = 1;
    355355      r->cf->npLogTable[0] = 0;
     
    382382#endif
    383383#ifdef HAVE_DIV_MOD
    384       r->cf->npInvTable=(CARDINAL*)omAlloc0( r->cf->npPrimeM*sizeof(CARDINAL) );
     384      r->cf->npInvTable=(unsigned short*)omAlloc0( r->cf->npPrimeM*sizeof(unsigned short) );
    385385#endif
    386386    }
  • kernel/modulop.h

    r4c4a80 r900802  
    6060/* for npMultM, npSubM, npNegM, npEqualM : */
    6161#ifdef HAVE_DIV_MOD
    62 extern CARDINAL *npInvTable;
     62extern unsigned short *npInvTable;
    6363#else
    6464#ifndef HAVE_MULT_MOD
    6565extern long npPminus1M;
    66 extern CARDINAL *npExpTable;
    67 extern CARDINAL *npLogTable;
     66extern unsigned short *npExpTable;
     67extern unsigned short *npLogTable;
    6868#endif
    6969#endif
  • kernel/numbers.cc

    r4c4a80 r900802  
    717717                 if (r->cf->npInvTable!=NULL)
    718718                 omFreeSize( (ADDRESS)r->cf->npInvTable,
    719                              r->cf->npPrimeM*sizeof(CARDINAL) );
     719                             r->cf->npPrimeM*sizeof(unsigned short) );
    720720                 #else
    721721                 if (r->cf->npExpTable!=NULL)
    722722                 {
    723723                   omFreeSize( (ADDRESS)r->cf->npExpTable,
    724                                r->cf->npPrimeM*sizeof(CARDINAL) );
     724                               r->cf->npPrimeM*sizeof(unsigned short) );
    725725                   omFreeSize( (ADDRESS)r->cf->npLogTable,
    726                                r->cf->npPrimeM*sizeof(CARDINAL) );
     726                               r->cf->npPrimeM*sizeof(unsigned short) );
    727727                 }
    728728                 #endif
  • kernel/structs.h

    r4c4a80 r900802  
    1919
    2020/* standard types */
    21 typedef unsigned short CARDINAL;
    2221#ifdef HAVE_RINGS
    2322typedef MP_INT *int_number;
     
    197196typedef struct p_Procs_s p_Procs_s;
    198197
    199 // for hdegree.cc
    200 typedef struct sindlist indlist;
    201 typedef indlist * indset;
    202 struct sindlist
    203 {
    204   indset nx;
    205   intvec * set;
    206 };
    207 
    208198// for longalg.cc
    209199struct snaIdeal
     
    235225   int npPminus1M;
    236226   #ifdef HAVE_DIV_MOD
    237    CARDINAL *npInvTable;
     227   unsigned short *npInvTable;
    238228   #endif
    239229   #if !defined(HAVE_DIV_MOD) || !defined(HAVE_MULT_MOD)
    240    CARDINAL *npExpTable;
    241    CARDINAL *npLogTable;
     230   unsigned short *npExpTable;
     231   unsigned short *npLogTable;
    242232   #endif
    243233   // Zp_a, Q_a
     
    615605     long vars are those longs in the exponent vector which are
    616606     occupied by variables, only */
    617   short     VarL_Size;
     607  short      VarL_Size;
    618608  short      BitsPerExp; /* number of bits per exponent */
    619609  short      ExpPerLong; /* maximal number of Exponents per long */
     
    828818
    829819extern struct omBin_s* char_ptr_bin;
    830 extern struct omBin_s* indlist_bin;
    831 extern struct omBin_s* naIdeal_bin;
    832 extern struct omBin_s* snaIdeal_bin;
    833820extern struct omBin_s* smprec_bin;
    834821extern struct omBin_s* sip_sring_bin;
Note: See TracChangeset for help on using the changeset viewer.