Changeset 0bf7dff in git


Ignore:
Timestamp:
Sep 19, 2000, 5:22:25 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
9c8b81ebdf5b81ba6d682234d624c628c8c2f128
Parents:
82063a79ea38ca00e3f4367decdd79d1b0fcdfb7
Message:
* hannes: rGetExpSize, removed some HAVE_SHIFTED_EXPONENTS


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

Legend:

Unmodified
Added
Removed
  • Singular/ring.cc

    r82063a r0bf7dff  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.117 2000-09-18 09:19:31 obachman Exp $ */
     4/* $Id: ring.cc,v 1.118 2000-09-19 15:22:23 Singular Exp $ */
    55
    66/*
     
    22932293
    22942294/*2
     2295* optimize rGetExpSize for a block of N variables, exp <=bitmask
     2296*/
     2297unsigned long rGetExpSize(unsigned long bitmask, int & bits, int N)
     2298{
     2299#if SIZEOF_LONG == 8
     2300#define BITS_FOR_EXPS 64
     2301#else
     2302// SIZEOF_LONG ==4, 32 bits
     2303#define BITS_FOR_EXPS 32
     2304#endif
     2305  bitmask =rGetExpSize(bitmask, &bits);
     2306  int vars_per_long=BITS_FOR_EXPS/bits;
     2307  int bits1;
     2308  loop
     2309  {
     2310    unsigned long bitmask1 =rGetExpSize(bitmask+1, &bits1);
     2311    int vars_per_long1=BITS_FOR_EXPS/bits1;
     2312    if (((N+vars_per_long-1)/vars_per_long)
     2313    == ((N+vars_per_long1-1)/vars_per_long1))
     2314    {
     2315      vars_per_long=vars_per_long1;
     2316      bits=bits1;
     2317      bitmask=bitmask1;
     2318    }
     2319    else
     2320    {
     2321      return bitmask; /* and bits */
     2322    }
     2323  }
     2324}
     2325
     2326/*2
    22952327 * create a copy of the ring r, which must be equivalent to currRing
    22962328 * used for std computations
  • Singular/ring.h

    r82063a r0bf7dff  
    77* ABSTRACT - the interpreter related ring operations
    88*/
    9 /* $Id: ring.h,v 1.50 2000-09-07 16:22:02 Singular Exp $ */
     9/* $Id: ring.h,v 1.51 2000-09-19 15:22:25 Singular Exp $ */
    1010
    1111/* includes */
     
    166166  ringorder_ws,
    167167  ringorder_Ws,
    168   #ifdef HAVE_SHIFTED_EXPONENTS
    169168  ringorder_L,
    170   #endif
    171169  ringorder_unspec
    172170} rRingOrder_t;
     
    224222#endif
    225223
    226 #ifdef HAVE_SHIFTED_EXPONENTS
    227224unsigned long rGetExpSize(unsigned long bitmask, int & bits);
     225unsigned long rGetExpSize(unsigned long bitmask, int & bits, int N);
    228226ring rModifyRing(ring r, BOOLEAN omit_degree,
    229227                         BOOLEAN omit_comp,
    230228                         unsigned long exp_limit);
    231229void rKillModifiedRing(ring r);
    232 #endif
    233230
    234231void rDebugPrint(ring r);
    235232void pDebugPrint(poly p);
    236 
    237 #endif
    238 
     233#endif
  • Singular/structs.h

    r82063a r0bf7dff  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: structs.h,v 1.36 2000-09-12 16:01:17 obachman Exp $ */
     6/* $Id: structs.h,v 1.37 2000-09-19 15:22:25 Singular Exp $ */
    77/*
    88* ABSTRACT
     
    114114typedef struct p_Procs_s p_Procs_s;
    115115
    116 // for hdegree.cc   
     116// for hdegree.cc
    117117typedef struct sindlist indlist;
    118118typedef indlist * indset;
     
    132132
    133133
    134 // for sparsemat.cc 
     134// for sparsemat.cc
    135135typedef struct smprec sm_prec;
    136136typedef sm_prec * smpoly;
     
    256256  int      *VarOffset;
    257257  /* mapping exp. of var(i) -> p->exp */
    258 #ifdef HAVE_SHIFTED_EXPONENTS
    259258  /* mapping exp. of var(i) ->
    260259  p->exp[(VarOffset[i] & 0xffffff)] >> (VarOffset[i] >> 24) & bitmask */
    261 #else
    262   /* mapping exp. of var(i) -> p->exp.e[VarOffset[i]] */
    263 #endif
    264260
    265261  struct omBin_s*   PolyBin; /* Bin from where monoms are allocated */
  • Singular/subexpr.cc

    r82063a r0bf7dff  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.68 2000-09-19 12:43:32 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.69 2000-09-19 15:22:25 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    11091109      }
    11101110      tmp.data=r;
    1111       if (rtyp==IDHDL)
     1111      if ((rtyp==IDHDL)||(rtyp==STRING_CMD))
    11121112      {
    11131113        tmp.next=next; next=NULL;
Note: See TracChangeset for help on using the changeset viewer.