Changeset 172d852 in git for kernel


Ignore:
Timestamp:
Jan 24, 2019, 2:32:29 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
08394f319ba420091cccad7e025c3f7cac04c373
Parents:
5abb79fd2458b47b21d297f2c8b26f285ac9546f756676ef1fcf4cff300fb1607a6d21293b253245
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2019-01-24 14:32:29+01:00
git-committer:
GitHub <noreply@github.com>2019-01-24 14:32:29+01:00
Message:
Merge pull request #906 from rbehrends/prelim-thread-rewrite

Singular changes for multi-threading support.
Location:
kernel
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/f5gb.cc

    r5abb79f r172d852  
    2929#define pDeg(A) p_Deg(A,currRing)
    3030
    31 int notInG              =   0;
    32 int numberOfRules       =   0;
    33 int reductionsToZero    =   0;
    34 int reductionTime       =   0;
    35 int spolsTime           =   0;
    36 int highestDegree       =   0;
    37 int degreeBound         =   0;
    38 int numberUsefulPairs   =   0;
    39 int numberUselessPairs  =   0;
    40 int numberUsefulPairsMinDeg = 0;
    41 int highestDegreeGBCriticalPair = 0;
    42 int numberRejectedF5CriticalPairs = 0;
    43 int numberOfReductions  = 0;
    44 int numberOfSpolys  = 0;
     31VAR int notInG              =   0;
     32VAR int numberOfRules       =   0;
     33VAR int reductionsToZero    =   0;
     34VAR int reductionTime       =   0;
     35VAR int spolsTime           =   0;
     36VAR int highestDegree       =   0;
     37VAR int degreeBound         =   0;
     38VAR int numberUsefulPairs   =   0;
     39VAR int numberUselessPairs  =   0;
     40VAR int numberUsefulPairsMinDeg = 0;
     41VAR int highestDegreeGBCriticalPair = 0;
     42VAR int numberRejectedF5CriticalPairs = 0;
     43VAR int numberOfReductions  = 0;
     44VAR int numberOfSpolys  = 0;
    4545/*
    4646====================================================================
     
    152152    // in the list critPairs
    153153    criticalPair(gPrev, critPairs, lTag, rTag, rules, rejectedGBList, plus);
    154     static LList* sPolyList        =   new LList();
     154    STATIC_VAR LList* sPolyList        =   new LList();
    155155    //sPolyList->print();
    156156    // labeled polynomials which have passed reduction() and have to be added to list gPrev
    157     static LList* completed        =   new LList();
     157    STATIC_VAR LList* completed        =   new LList();
    158158    // the reduced labeled polynomials which are returned from subalgorithm reduction()
    159     static LList* reducedLPolys     =   new LList();
     159    STATIC_VAR LList* reducedLPolys     =   new LList();
    160160    // while there are critical pairs to be further checked and deleted/computed
    161161    while(NULL != critPairs->getFirst()) {
  • kernel/GBEngine/janet.cc

    r5abb79f r172d852  
    2727
    2828//------GLOBALS-------
    29 static int /*m_s,v_s,vectorized,VarN1,*/offset;
    30 static jList *T,*Q;
    31 static TreeM *G;
     29STATIC_VAR int /*m_s,v_s,vectorized,VarN1,*/offset;
     30STATIC_VAR jList *T,*Q;
     31STATIC_VAR TreeM *G;
    3232// static Poly *phD;
    33 static NodeM *FreeNodes;
    34 static int degree_compatible;
    35 static int (*ListGreatMove)(jList *,jList *,poly);
    36 static int Mask[8]={0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x1};
     33STATIC_VAR NodeM *FreeNodes;
     34STATIC_VAR int degree_compatible;
     35STATIC_VAR int (*ListGreatMove)(jList *,jList *,poly);
     36STATIC_VAR int Mask[8]={0x80,0x40,0x20,0x10,0x8,0x4,0x2,0x1};
    3737
    3838//#define DebugPrint
     
    4040//#define pow_(x) pTotaldegree((x))
    4141//#define pow_(x) p_Deg((x,currRing))
    42 pFDegProc jDeg;
     42VAR pFDegProc jDeg;
    4343#define pow_(x) jDeg((x),currRing)
    4444
     
    753753}
    754754
    755 static Poly *temp_l;
     755STATIC_VAR Poly *temp_l;
    756756
    757757NodeM* create()
     
    969969}
    970970
    971 static Poly *h/*,*f*/;
     971STATIC_VAR Poly *h/*,*f*/;
    972972
    973973#if 0
  • kernel/GBEngine/kspoly.cc

    r5abb79f r172d852  
    2525
    2626#ifdef KDEBUG
    27 int red_count = 0;
    28 int create_count = 0;
     27VAR int red_count = 0;
     28VAR int create_count = 0;
    2929// define this if reductions are reported on TEST_OPT_DEBUG
    3030#define TEST_OPT_DEBUG_RED
  • kernel/GBEngine/kstd1.cc

    r5abb79f r172d852  
    4040
    4141/* the list of all options which give a warning by test */
    42 BITSET kOptions=Sy_bit(OPT_PROT)           /*  0 */
     42VAR BITSET kOptions=Sy_bit(OPT_PROT)           /*  0 */
    4343                |Sy_bit(OPT_REDSB)         /*  1 */
    4444                |Sy_bit(OPT_NOT_SUGAR)     /*  3 */
     
    5555/* the list of all options which may be used by option and test */
    5656/* defintion of ALL options: libpolys/misc/options.h */
    57 BITSET validOpts=Sy_bit(0)
     57VAR BITSET validOpts=Sy_bit(0)
    5858                |Sy_bit(1)
    5959                |Sy_bit(2) // obachman 10/00: replaced by notBucket
     
    20612061}
    20622062
    2063 intvec * kModW, * kHomW;
     2063VAR intvec * kModW, * kHomW;
    20642064
    20652065long kModDeg(poly p, ring r)
  • kernel/GBEngine/kstd1.h

    r5abb79f r172d852  
    4545//extern int syzComp;
    4646  /*stop building pairs after that component --> ideals.cc, syz.cc */
    47 extern int LazyPass,LazyDegree,Kstd1_mu,Kstd1_deg;
     47EXTERN_VAR int LazyPass,LazyDegree,Kstd1_mu,Kstd1_deg;
    4848  /*parameters for Lazy or global stops --> ipshell.cc, grammar.y*/
    49 extern BITSET kOptions;
     49EXTERN_VAR BITSET kOptions;
    5050  /*the known test options (a constant)*/
    51 extern BITSET validOpts;
     51EXTERN_VAR BITSET validOpts;
    5252
    5353void initMora(ideal F,kStrategy strat);
     
    6464
    6565
    66 extern intvec * kModW;
    67 extern intvec * kHomW;
     66EXTERN_VAR intvec * kModW;
     67EXTERN_VAR intvec * kHomW;
    6868
    6969
  • kernel/GBEngine/kstd2.cc

    r5abb79f r172d852  
    4747// counts sba's reduction steps
    4848#if SBA_PRINT_REDUCTION_STEPS
    49 long sba_reduction_steps;
    50 long sba_interreduction_steps;
     49VAR long sba_reduction_steps;
     50VAR long sba_interreduction_steps;
    5151#endif
    5252#if SBA_PRINT_OPERATIONS
    53 long sba_operations;
    54 long sba_interreduction_operations;
     53VAR long sba_operations;
     54VAR long sba_interreduction_operations;
    5555#endif
    5656
     
    7878#endif
    7979
    80   int (*test_PosInT)(const TSet T,const int tl,LObject &h);
    81   int (*test_PosInL)(const LSet set, const int length,
     80  VAR int (*test_PosInT)(const TSet T,const int tl,LObject &h);
     81  VAR int (*test_PosInL)(const LSet set, const int length,
    8282                LObject* L,const kStrategy strat);
    8383
  • kernel/GBEngine/kstdfac.cc

    r5abb79f r172d852  
    1919#include "kernel/GBEngine/kstdfac.h"
    2020
    21 int strat_nr=0;
     21VAR int strat_nr=0;
    2222/*3
    2323* copy o->T to n->T, assumes that n->S is already copied
  • kernel/GBEngine/kutil.cc

    r5abb79f r172d852  
    8686#endif
    8787
    88 denominator_list DENOMINATOR_LIST=NULL;
     88VAR denominator_list DENOMINATOR_LIST=NULL;
    8989
    9090
     
    234234
    235235
    236 int     HCord;
    237 int     Kstd1_deg;
    238 int     Kstd1_mu=32000;
     236VAR int     HCord;
     237VAR int     Kstd1_deg;
     238VAR int     Kstd1_mu=32000;
    239239
    240240/*2
     
    762762}
    763763
    764 static BOOLEAN sloppy_max = FALSE;
     764STATIC_VAR BOOLEAN sloppy_max = FALSE;
    765765BOOLEAN kTest_T(TObject * T, ring strat_tailRing, int i, char TN)
    766766{
  • kernel/GBEngine/kutil.h

    r5abb79f r172d852  
    6060
    6161struct denominator_list_s{number n; denominator_list next;};
    62 extern denominator_list DENOMINATOR_LIST;
     62EXTERN_VAR denominator_list DENOMINATOR_LIST;
    6363
    6464class sTObject
     
    174174};
    175175
    176 extern int strat_nr;
     176EXTERN_VAR int strat_nr;
    177177
    178178class sLObject : public sTObject
     
    263263
    264264
    265 extern int HCord;
     265EXTERN_VAR int HCord;
    266266
    267267class skStrategy
     
    866866ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
    867867// test syz strategy: // will be removed soon
    868 extern int (*test_PosInT)(const TSet T,const int tl,LObject &h);
    869 extern int (*test_PosInL)(const LSet set, const int length,
     868EXTERN_VAR int (*test_PosInT)(const TSet T,const int tl,LObject &h);
     869EXTERN_VAR int (*test_PosInL)(const LSet set, const int length,
    870870                LObject* L,const kStrategy strat);
    871871
  • kernel/GBEngine/syz.h

    r5abb79f r172d852  
    115115void syKillEmptyEntres(resolvente res,int length);
    116116
    117 extern int *  currcomponents;
    118 extern long *  currShiftedComponents;
     117EXTERN_VAR int *  currcomponents;
     118EXTERN_VAR long *  currShiftedComponents;
    119119
    120120void syDeletePair(SObject * so);
  • kernel/GBEngine/syz1.cc

    r5abb79f r172d852  
    3131/*--------------static variables------------------------*/
    3232/*---points to the real components, shifted of the actual module-*/
    33 int *  currcomponents=NULL;
    34 long *  currShiftedComponents=NULL;
     33VAR int *  currcomponents=NULL;
     34VAR long *  currShiftedComponents=NULL;
    3535
    3636
  • kernel/GBEngine/syz2.cc

    r5abb79f r172d852  
    4545
    4646#ifdef SHOW_CRIT
    47 static int crit;
    48 static int crit1;
    49 static int spfl;
    50 static int cons_pairs;
    51 static int crit_fails;
     47STATIC_VAR int crit;
     48STATIC_VAR int crit1;
     49STATIC_VAR int spfl;
     50STATIC_VAR int cons_pairs;
     51STATIC_VAR int crit_fails;
    5252#endif
    5353typedef struct sopen_pairs open_pairs;
  • kernel/GBEngine/syz3.cc

    r5abb79f r172d852  
    4646#define WITH_SORT
    4747//#define FULL_TOTAKE
    48 int discard_pairs;
    49 int short_pairs;
     48VAR int discard_pairs;
     49VAR int short_pairs;
    5050
    5151/*3
  • kernel/GBEngine/syz4.cc

    r5abb79f r172d852  
    228228typedef std::map<poly, poly, cache_compare> cache_term;
    229229
    230 static cache_term *Cache;
     230STATIC_VAR cache_term *Cache;
    231231
    232232static void initialize_cache(const int size)
  • kernel/GBEngine/tgb.cc

    r5abb79f r172d852  
    3939#define ADD_LATER_SIZE 500
    4040#if 1
    41 static omBin lm_bin = NULL;
     41STATIC_VAR omBin lm_bin = NULL;
    4242static int add_to_reductors(slimgb_alg* c, poly h, int len, int ecart, BOOLEAN simplified=FALSE);
    4343static void multi_reduction(red_object* los, int & losl, slimgb_alg* c);
     
    20902090                  slimgb_alg * c)
    20912091{
    2092   static int export_n = 0;
     2092  STATIC_VAR int export_n = 0;
    20932093  assume (terms[tn - 1] != NULL);
    20942094  assume (rField_is_Zp (c->r));
     
    48964896void multi_reduce_step (find_erg & erg, red_object * r, slimgb_alg * c)
    48974897{
    4898   static int id = 0;
     4898  STATIC_VAR int id = 0;
    48994899  id++;
    49004900  unsigned long sev;
  • kernel/combinatorics/hdegree.cc

    r5abb79f r172d852  
    1919#include "kernel/combinatorics/stairc.h"
    2020
    21 int  hCo, hMu, hMu2;
    22 omBin indlist_bin = omGetSpecBin(sizeof(indlist));
     21VAR int  hCo, hMu, hMu2;
     22VAR omBin indlist_bin = omGetSpecBin(sizeof(indlist));
    2323
    2424/*0 implementation*/
     
    128128
    129129// independent set
    130 static scmon hInd;
     130STATIC_VAR scmon hInd;
    131131
    132132static void hIndSolve(scmon pure, int Npure, scfmon rad, int Nrad,
     
    276276}
    277277
    278 indset ISet, JSet;
     278VAR indset ISet, JSet;
    279279
    280280static BOOLEAN hNotZero(scfmon rad, int Nrad, varset var, int Nvar)
     
    928928// HC
    929929
    930 static poly pWork;
     930STATIC_VAR poly pWork;
    931931
    932932static void hHedge(poly hEdge)
     
    10741074//  kbase
    10751075
    1076 static poly last;
    1077 static scmon act;
     1076STATIC_VAR poly last;
     1077STATIC_VAR scmon act;
    10781078
    10791079static void scElKbase()
  • kernel/combinatorics/hilb.cc

    r5abb79f r172d852  
    4242#endif
    4343
    44 static int  **Qpol;
    45 static int  *Q0, *Ql;
    46 static int  hLength;
     44STATIC_VAR int  **Qpol;
     45STATIC_VAR int  *Q0, *Ql;
     46STATIC_VAR int  hLength;
    4747
    4848
  • kernel/combinatorics/hutil.cc

    r5abb79f r172d852  
    1414#include "kernel/combinatorics/hutil.h"
    1515
    16 scfmon hexist, hstc, hrad, hwork;
    17 scmon hpure, hpur0;
    18 varset hvar, hsel;
    19 int  hNexist, hNstc, hNrad, hNvar, hNpure;
    20 int hisModule;
    21 monf stcmem, radmem;
     16VAR scfmon hexist, hstc, hrad, hwork;
     17VAR scmon hpure, hpur0;
     18VAR varset hvar, hsel;
     19VAR int  hNexist, hNstc, hNrad, hNvar, hNpure;
     20VAR int hisModule;
     21VAR monf stcmem, radmem;
    2222
    2323// Making a global "security" copy of the allocated exponent vectors
     
    2727// "security" copy as well. But then, all the relevant data is held in
    2828// global variables, so we might do that here, as well.
    29 static scfmon hsecure= NULL;
     29STATIC_VAR scfmon hsecure= NULL;
    3030
    3131scfmon hInit(ideal S, ideal Q, int *Nexist, ring tailRing)
  • kernel/combinatorics/hutil.h

    r5abb79f r172d852  
    3535#define LEN_MON (sizeof(scfmon) + sizeof(int))
    3636
    37 extern omBin indlist_bin;
     37EXTERN_VAR omBin indlist_bin;
    3838
    39 extern scfmon hexist, hstc, hrad, hwork;
    40 extern scmon hpure, hpur0;
    41 extern varset hvar, hsel;
    42 extern int hNexist, hNstc, hNrad, hNvar, hNpure;
    43 extern monf stcmem, radmem;
    44 extern int hisModule;
    45 extern monf stcmem, radmem;
    46 extern indset ISet, JSet;
    47 extern int  hCo, hMu, hMu2;
     39EXTERN_VAR scfmon hexist, hstc, hrad, hwork;
     40EXTERN_VAR scmon hpure, hpur0;
     41EXTERN_VAR varset hvar, hsel;
     42EXTERN_VAR int hNexist, hNstc, hNrad, hNvar, hNpure;
     43EXTERN_VAR monf stcmem, radmem;
     44EXTERN_VAR int hisModule;
     45EXTERN_VAR monf stcmem, radmem;
     46EXTERN_VAR indset ISet, JSet;
     47EXTERN_VAR int  hCo, hMu, hMu2;
    4848
    4949
  • kernel/digitech.cc

    r5abb79f r172d852  
    1111#include "polys/kbuckets.h"
    1212#include "kernel/ideals.h"
    13 static ideal zero_ideal;
     13STATIC_INST_VAR ideal zero_ideal;
    1414
    1515void bit_reduce(poly & f,ring r)
  • kernel/fast_mult.cc

    r5abb79f r172d852  
    1111typedef poly fastmultrec(poly f, poly g, ring r);
    1212static const int pass_option=1;
    13 static int mults=0;
     13STATIC_VAR int mults=0;
    1414int Mults()
    1515{
     
    427427  return erg;
    428428}
    429 static omBin lm_bin=NULL;
     429STATIC_VAR omBin lm_bin=NULL;
    430430/*3
    431431* compute for monomials p*q
  • kernel/groebner_walk/walkMain.cc

    r5abb79f r172d852  
    3535
    3636
    37 int overflow_error; //global variable
     37VAR int overflow_error; //global variable
    3838
    3939/*
  • kernel/groebner_walk/walkSupport.cc

    r5abb79f r172d852  
    1313#include "kernel/GBEngine/kstd1.h"
    1414
    15 extern BOOLEAN overflow_error;
     15EXTERN_VAR BOOLEAN overflow_error;
    1616
    1717///////////////////////////////////////////////////////////////////
  • kernel/ideals.cc

    r5abb79f r172d852  
    28662866}
    28672867
    2868 static int * id_satstdSaturatingVariables=NULL;
     2868STATIC_VAR int * id_satstdSaturatingVariables=NULL;
    28692869
    28702870static BOOLEAN id_sat_vars_sp(kStrategy strat)
  • kernel/linear_algebra/Minor.h

    r5abb79f r172d852  
    539539    * This member can be set using MinorValue::SetRankingStrategy (const int).
    540540    */
    541     static int g_rankingStrategy;
     541    STATIC_VAR int g_rankingStrategy;
    542542
    543543    /**
  • kernel/linear_algebra/MinorProcessor.cc

    r5abb79f r172d852  
    1717
    1818#ifdef COUNT_AND_PRINT_OPERATIONS
    19 long addsPoly        = 0;    /* for the number of additions of two polynomials */
    20 long multsPoly       = 0;    /* for the number of multiplications of two polynomials */
    21 long addsPolyForDiv  = 0;    /* for the number of additions of two polynomials for
     19VAR long addsPoly        = 0;    /* for the number of additions of two polynomials */
     20VAR long multsPoly       = 0;    /* for the number of multiplications of two polynomials */
     21VAR long addsPolyForDiv  = 0;    /* for the number of additions of two polynomials for
    2222                                polynomial division part */
    23 long multsPolyForDiv = 0;    /* for the number of multiplications of two polynomials
     23VAR long multsPolyForDiv = 0;    /* for the number of multiplications of two polynomials
    2424                                for polynomial division part */
    25 long multsMon        = 0;    /* for the number of multiplications of two monomials */
    26 long multsMonForDiv  = 0;    /* for the number of m-m-multiplications for polynomial
     25VAR long multsMon        = 0;    /* for the number of multiplications of two monomials */
     26VAR long multsMonForDiv  = 0;    /* for the number of m-m-multiplications for polynomial
    2727                                division part */
    28 long savedMultsMFD   = 0;    /* number of m-m-multiplications that could be saved
     28VAR long savedMultsMFD   = 0;    /* number of m-m-multiplications that could be saved
    2929                                when polynomial division would be optimal
    3030                                (if p / t1 = t2 + ..., then t1 * t2 = LT(p), i.e.,
    3131                                this multiplication need not be performed which
    3232                                would save one m-m-multiplication) */
    33 long divsMon         = 0;    /* for the number of divisions of two monomials;
     33VAR long divsMon         = 0;    /* for the number of divisions of two monomials;
    3434                                these are all guaranteed to work, i.e., m1/m2 only
    3535                                when exponentVector(m1) >= exponentVector(m2) */
  • kernel/linear_algebra/interpolation.cc

    r5abb79f r172d852  
    3131#define exponent int
    3232
    33 static modp_number myp;  // all modp computation done mod myp
    34 static int myp_index; // index of small prime in Singular table of primes
     33STATIC_VAR modp_number myp;  // all modp computation done mod myp
     34STATIC_VAR int myp_index; // index of small prime in Singular table of primes
    3535
    3636static inline modp_number modp_mul (modp_number x,modp_number y)
     
    8181typedef bool *coord_exist_table;
    8282
    83 static int final_base_dim;    // dimension of the quotient space, known from the beginning
    84 static int last_solve_column;  // last non-zero column in "solve" part of matrix, used for speed up
    85 static int n_points;  // modp_number of ideals (points)
    86 static int *multiplicity;  // multiplicities of points
    87 static int variables;  // modp_number of variables
    88 static int max_coord;  // maximal possible coordinate product used during Evaluation
    89 static bool only_modp;  // perform only one modp computations
    90 
    91 static modp_coordinates *modp_points; // coordinates of points for modp problem - used by Evaluate (this is also initial data for only modp)
    92 static q_coordinates *q_points; // coordinates of points for rational data (not used for modp)
    93 static int_coordinates *int_points; // coordinates of points for integer data - used to check generators (not used for modp)
    94 static coord_exist_table *coord_exist; // checks whether all coordinates has been initialized
    95 static mon_list_entry *check_list; // monomials to be checked in next stages
    96 static coordinates *points; // power products of coordinates of points used in modp cycles
    97 static condition_type *condition_list; // conditions stored in an array
    98 static mon_list_entry *lt_list; // leading terms found so far
    99 static mon_list_entry *base_list; // standard monomials found so far
    100 static row_list_entry *row_list; // rows of the matrix (both parts)
    101 static modp_number *my_row; // one special row to perform operations
    102 static modp_number *my_solve_row; // one special row to find the linear dependence ("solve" part)
    103 static mono_type *column_name; // monomials assigned to columns in solve_row
    104 
    105 static int n_results;  // modp_number of performed modp computations (not discarded)
    106 static modp_number modp_denom; // denominator of mod p computations
    107 static modp_result_entry *modp_result; // list of results for various mod p calculations (used for modp - first result is the desired one)
    108 static modp_result_entry *cur_result; // pointer to current result (as before)
    109 static modp_number *congr; // primes used in computations (chinese remainder theorem) (not used for modp)
    110 static modp_number *in_gamma; // inverts used in chinese remainder theorem (not used for modp)
    111 static mpz_t bigcongr; // result, in fact, is given in mod bigcongr (not used for modp)
    112 
    113 static mpz_t *polycoef; // polynomial integercoefficients (not used for modp)
    114 static mono_type *polyexp; // polynomial exponents
     83STATIC_VAR int final_base_dim;    // dimension of the quotient space, known from the beginning
     84STATIC_VAR int last_solve_column;  // last non-zero column in "solve" part of matrix, used for speed up
     85STATIC_VAR int n_points;  // modp_number of ideals (points)
     86STATIC_VAR int *multiplicity;  // multiplicities of points
     87STATIC_VAR int variables;  // modp_number of variables
     88STATIC_VAR int max_coord;  // maximal possible coordinate product used during Evaluation
     89STATIC_VAR bool only_modp;  // perform only one modp computations
     90
     91STATIC_VAR modp_coordinates *modp_points; // coordinates of points for modp problem - used by Evaluate (this is also initial data for only modp)
     92STATIC_VAR q_coordinates *q_points; // coordinates of points for rational data (not used for modp)
     93STATIC_VAR int_coordinates *int_points; // coordinates of points for integer data - used to check generators (not used for modp)
     94STATIC_VAR coord_exist_table *coord_exist; // checks whether all coordinates has been initialized
     95STATIC_VAR mon_list_entry *check_list; // monomials to be checked in next stages
     96STATIC_VAR coordinates *points; // power products of coordinates of points used in modp cycles
     97STATIC_VAR condition_type *condition_list; // conditions stored in an array
     98STATIC_VAR mon_list_entry *lt_list; // leading terms found so far
     99STATIC_VAR mon_list_entry *base_list; // standard monomials found so far
     100STATIC_VAR row_list_entry *row_list; // rows of the matrix (both parts)
     101STATIC_VAR modp_number *my_row; // one special row to perform operations
     102STATIC_VAR modp_number *my_solve_row; // one special row to find the linear dependence ("solve" part)
     103STATIC_VAR mono_type *column_name; // monomials assigned to columns in solve_row
     104
     105STATIC_VAR int n_results;  // modp_number of performed modp computations (not discarded)
     106STATIC_VAR modp_number modp_denom; // denominator of mod p computations
     107STATIC_VAR modp_result_entry *modp_result; // list of results for various mod p calculations (used for modp - first result is the desired one)
     108STATIC_VAR modp_result_entry *cur_result; // pointer to current result (as before)
     109STATIC_VAR modp_number *congr; // primes used in computations (chinese remainder theorem) (not used for modp)
     110STATIC_VAR modp_number *in_gamma; // inverts used in chinese remainder theorem (not used for modp)
     111STATIC_VAR mpz_t bigcongr; // result, in fact, is given in mod bigcongr (not used for modp)
     112
     113STATIC_VAR mpz_t *polycoef; // polynomial integercoefficients (not used for modp)
     114STATIC_VAR mono_type *polyexp; // polynomial exponents
    115115
    116116struct gen_list_struct {mpz_t *polycoef;
     
    119119typedef struct gen_list_struct gen_list_entry;
    120120
    121 static gen_list_entry *gen_list=NULL; // list of resulting generators - output data (integer version)
    122 
    123 static int generic_n_generators; // modp_number of generators - should be the same for all modp comp (not used for modp)
    124 static mono_type *generic_column_name; // monomials assigned to columns in solve_row - should be the same for all modp comp (!!! used for modp)
    125 static mon_list_entry *generic_lt=NULL; // leading terms for ordered generators - should be the same for all modp comp (not used for modp)
    126 static int good_primes; // modp_number of good primes so far;
    127 static int bad_primes; // modp_number of bad primes so far;
    128 static mpz_t common_denom; // common denominator used to force points coordinates to Z (not used for modp)
    129 static bool denom_divisible; // common denominator is divisible by p (not used for modp)
    130 
    131 static poly comparizon_p1;  //polynomials used to do comparizons by Singular
    132 static poly comparizon_p2;
    133 
    134 static modp_number *modp_Reverse; // reverses in mod p
    135 
    136 static bool protocol; // true to show the protocol
     121STATIC_VAR gen_list_entry *gen_list=NULL; // list of resulting generators - output data (integer version)
     122
     123STATIC_VAR int generic_n_generators; // modp_number of generators - should be the same for all modp comp (not used for modp)
     124STATIC_VAR mono_type *generic_column_name; // monomials assigned to columns in solve_row - should be the same for all modp comp (!!! used for modp)
     125STATIC_VAR mon_list_entry *generic_lt=NULL; // leading terms for ordered generators - should be the same for all modp comp (not used for modp)
     126STATIC_VAR int good_primes; // modp_number of good primes so far;
     127STATIC_VAR int bad_primes; // modp_number of bad primes so far;
     128STATIC_VAR mpz_t common_denom; // common denominator used to force points coordinates to Z (not used for modp)
     129STATIC_VAR bool denom_divisible; // common denominator is divisible by p (not used for modp)
     130
     131STATIC_VAR poly comparizon_p1;  //polynomials used to do comparizons by Singular
     132STATIC_VAR poly comparizon_p2;
     133
     134STATIC_VAR modp_number *modp_Reverse; // reverses in mod p
     135
     136STATIC_VAR bool protocol; // true to show the protocol
    137137
    138138#ifdef checksize
    139 static int maximal_size=0;
     139STATIC_VAR int maximal_size=0;
    140140#endif
    141141
  • kernel/linear_algebra/linearAlgebra.cc

    r756676e r172d852  
    969969/**
    970970 * Performs one transformation step on the given matrix H as part of
    971  * the gouverning QR double shift algorith.
     971 * the gouverning QR double shift algorithm.
    972972 * The method will change the given matrix H side-effect-wise. The resulting
    973973 * matrix H' will be in Hessenberg form.
  • kernel/maps/fast_maps.cc

    r5abb79f r172d852  
    132132*F  mapolyCreate  . . . . . . . . . . . . . . .  Creates mapoly
    133133*/
    134 static omBin mapolyBin = omGetSpecBin(sizeof(mapoly_s));
    135 static omBin macoeffBin = omGetSpecBin(sizeof(macoeff_s));
     134STATIC_VAR omBin mapolyBin = omGetSpecBin(sizeof(mapoly_s));
     135STATIC_VAR omBin macoeffBin = omGetSpecBin(sizeof(macoeff_s));
    136136
    137137mapoly maMonomial_Create(poly p, ring /*r_p*/, sBucket_pt bucket)
  • kernel/numeric/mpr_base.h

    r5abb79f r172d852  
    113113ideal loNewtonPolytope( const ideal id );
    114114
    115 extern size_t gmp_output_digits;
     115EXTERN_VAR size_t gmp_output_digits;
    116116//%e
    117117#endif /*MPR_BASE_H*/
  • kernel/oswrapper/feread.cc

    r5abb79f r172d852  
    5454char *command_generator (char *text, int state)
    5555{
    56   static int list_index, len;
    57   static idhdl h;
     56  STATIC_VAR int list_index, len;
     57  STATIC_VAR idhdl h;
    5858  const char *name;
    5959
     
    126126  #ifndef READLINE_READLINE_H_OK
    127127    /* declare everything we need explicitely and do not rely on includes */
    128     extern char * rl_readline_name;
    129     extern char *rl_line_buffer;
     128    EXTERN_VAR char * rl_readline_name;
     129    EXTERN_VAR char *rl_line_buffer;
    130130    char *rl_filename_completion_function(const char*, int);
    131131    typedef char **CPPFunction ();
    132132
    133133    extern char ** rl_completion_matches (const char*, RL_PROC);
    134     extern CPPFunction * rl_attempted_completion_function;
    135     extern FILE * rl_outstream;
     134    EXTERN_VAR CPPFunction * rl_attempted_completion_function;
     135    EXTERN_VAR FILE * rl_outstream;
    136136    extern char * readline (const char *);
    137137    extern void add_history (char *);
     
    164164  char *(*fe_filename_completion_function)(); /* 3 */
    165165  char *(* fe_readline) (char *);             /* 4 */
    166   void (*fe_add_history) (char *);            /* 5 */
    167   char ** fe_rl_readline_name;                /* 6 */
    168   char **fe_rl_line_buffer;                   /* 7 */
     166  VAR void (*fe_add_history) (char *);            /* 5 */
     167  VAR char ** fe_rl_readline_name;                /* 6 */
     168  VAR char **fe_rl_line_buffer;                   /* 7 */
    169169  char **(*fe_completion_matches)(...);          /* 8 */
    170   CPPFunction **fe_rl_attempted_completion_function; /* 9 */
    171   FILE ** fe_rl_outstream;                    /* 10 */
    172   int (*fe_write_history) ();                 /* 11 */
    173   int (*fe_history_total_bytes) ();           /* 12 */
    174   void (*fe_using_history) ();                /* 13 */
    175   int (*fe_read_history) (char *);            /* 14 */
     170  VAR CPPFunction **fe_rl_attempted_completion_function; /* 9 */
     171  VAR FILE ** fe_rl_outstream;                    /* 10 */
     172  VAR int (*fe_write_history) ();                 /* 11 */
     173  VAR int (*fe_history_total_bytes) ();           /* 12 */
     174  VAR void (*fe_using_history) ();                /* 13 */
     175  VAR int (*fe_read_history) (char *);            /* 14 */
    176176
    177177}
  • kernel/oswrapper/feread.h

    r5abb79f r172d852  
    1010#include "kernel/structs.h"
    1111
    12 extern char    prompt_char; /*1 either '>' or '.'*/
     12EXTERN_VAR char    prompt_char; /*1 either '>' or '.'*/
    1313
    1414#ifdef __cplusplus
  • kernel/oswrapper/fereadl.c

    r5abb79f r172d852  
    5757#define feCTRL(C) ((C) & 0x1F)    /* <ctrl> character  */
    5858
    59 struct termios fe_saved_attributes;
    60 
    61 static BOOLEAN fe_stdout_is_tty;
    62 static BOOLEAN fe_stdin_is_tty;
    63 BOOLEAN fe_use_fgets=FALSE;
    64 static BOOLEAN fe_is_initialized=FALSE;
    65 
    66 FILE *  fe_echo; /*the output file for echoed characters*/
     59VAR struct termios fe_saved_attributes;
     60
     61STATIC_VAR BOOLEAN fe_stdout_is_tty;
     62STATIC_VAR BOOLEAN fe_stdin_is_tty;
     63VAR BOOLEAN fe_use_fgets=FALSE;
     64STATIC_VAR BOOLEAN fe_is_initialized=FALSE;
     65
     66VAR FILE *  fe_echo; /*the output file for echoed characters*/
    6767
    6868#define fe_hist_max 32
    69 char ** fe_hist=NULL;
    70 short   fe_hist_pos;
    71 BOOLEAN fe_is_raw_tty=0;
    72 short   fe_cursor_pos; /* 0..colmax-1*/
    73 short   fe_cursor_line; /* 0..pagelength-1*/
     69VAR char ** fe_hist=NULL;
     70VAR short   fe_hist_pos;
     71VAR BOOLEAN fe_is_raw_tty=0;
     72VAR short   fe_cursor_pos; /* 0..colmax-1*/
     73VAR short   fe_cursor_line; /* 0..pagelength-1*/
    7474
    7575#ifndef HAVE_ATEXIT
     
    131131}
    132132
    133 static char termcap_buff[2048];
     133STATIC_VAR char termcap_buff[2048];
    134134static int fe_out_char(int c)
    135135{
     
    197197    {
    198198      #ifndef __CYGWIN__
    199       extern char *BC;
    200       extern char *UP;
    201       extern char PC;
     199      EXTERN_VAR char *BC;
     200      EXTERN_VAR char *UP;
     201      EXTERN_VAR char PC;
    202202      #endif
    203203      /* OB: why this ? HS: char t_buf[128] does not work with glibc2 systems */
     
    713713  char *(*fe_filename_completion_function)(); /* 3 */
    714714  char *(* fe_readline) ();                   /* 4 */
    715   void (*fe_add_history) ();                  /* 5 */
    716   char ** fe_rl_readline_name;                /* 6 */
    717   char **fe_rl_line_buffer;                   /* 7 */
     715  VAR void (*fe_add_history) ();                  /* 5 */
     716  VAR char ** fe_rl_readline_name;                /* 6 */
     717  VAR char **fe_rl_line_buffer;                   /* 7 */
    718718  char **(*fe_completion_matches)();          /* 8 */
    719   CPPFunction **fe_rl_attempted_completion_function; /* 9 */
    720   FILE ** fe_rl_outstream;                    /* 10 */
    721   int (*fe_write_history) ();                 /* 11 */
    722   int (*fe_history_total_bytes) ();           /* 12 */
    723   void (*fe_using_history) ();                /* 13 */
    724   int (*fe_read_history) ();                  /* 14 */
    725 
    726 void * fe_rl_hdl=NULL;
     719  VAR CPPFunction **fe_rl_attempted_completion_function; /* 9 */
     720  VAR FILE ** fe_rl_outstream;                    /* 10 */
     721  VAR int (*fe_write_history) ();                 /* 11 */
     722  VAR int (*fe_history_total_bytes) ();           /* 12 */
     723  VAR void (*fe_using_history) ();                /* 13 */
     724  VAR int (*fe_read_history) ();                  /* 14 */
     725
     726VAR void * fe_rl_hdl=NULL;
    727727
    728728char *command_generator (char *text, int state);
  • kernel/oswrapper/timer.cc

    r5abb79f r172d852  
    1515#include <unistd.h>
    1616
    17 int        timerv = 0;
    18 static double timer_resolution = TIMER_RESOLUTION;
    19 
    20 static double mintime = 0.5;
     17VAR int        timerv = 0;
     18STATIC_VAR double timer_resolution = TIMER_RESOLUTION;
     19
     20STATIC_VAR double mintime = 0.5;
    2121
    2222void SetTimerResolution(int res)
     
    5656* the start time of the timer
    5757*/
    58 static int64 siStartTime;
    59 static int64 startl;
     58STATIC_VAR int64 siStartTime;
     59STATIC_VAR int64 startl;
    6060
    6161/*3
    6262* temp structure to get the time
    6363*/
    64 static struct rusage t_rec;
     64STATIC_VAR struct rusage t_rec;
    6565/*0 implementation*/
    6666
     
    114114*/
    115115#ifdef EXTEND_TIMER_D
    116 extern int iiOp;
     116EXTERN_VAR int iiOp;
    117117#endif
    118118
     
    144144
    145145/*0 Real timer implementation*/
    146 int rtimerv = 0;
    147 static struct timeval  startRl;
    148 static struct timeval  siStartRTime;
    149 static struct timezone tzp;
     146VAR int rtimerv = 0;
     147STATIC_VAR struct timeval  startRl;
     148STATIC_VAR struct timeval  siStartRTime;
     149STATIC_VAR struct timezone tzp;
    150150
    151151void startRTimer()
  • kernel/oswrapper/timer.h

    r5abb79f r172d852  
    88*/
    99
    10 extern int timerv;
     10EXTERN_VAR int timerv;
    1111void startTimer(void);
    1212void writeTime(const char* s);
     
    1515int  getTimer();
    1616
    17 extern int rtimerv;
     17EXTERN_VAR int rtimerv;
    1818void startRTimer(void);
    1919void writeRTime(const char* s);
  • kernel/polys.cc

    r5abb79f r172d852  
    1010/// Widely used global variable which specifies the current polynomial ring for Singular interpreter and legacy implementatins.
    1111/// @Note: one should avoid using it in newer designs, for example due to possible problems in parallelization with threads.
    12 ring  currRing = NULL;
     12VAR ring  currRing = NULL;
    1313
    1414void rChangeCurrRing(ring r)
  • kernel/polys.h

    r5abb79f r172d852  
    1616#include "polys/monomials/p_polys.h"
    1717
    18 extern ring currRing;
     18EXTERN_VAR ring currRing;
    1919void rChangeCurrRing(ring r);
    2020
  • kernel/structs.h

    r5abb79f r172d852  
    8080#define loop for(;;)
    8181
    82 extern omBin char_ptr_bin;
     82EXTERN_VAR omBin char_ptr_bin;
    8383
    8484#endif
Note: See TracChangeset for help on using the changeset viewer.