polys.cc
Go to the documentation of this file.
1 
2 #include <kernel/mod2.h>
3 
4 #include <omalloc/omalloc.h>
5 #include <misc/auxiliary.h>
6 #include <misc/options.h>
7 
8 #include "polys.h"
9 
10 /// Widely used global variable which specifies the current polynomial ring for Singular interpreter and legacy implementatins.
11 /// @Note: one should avoid using it in newer designs, for example due to possible problems in parallelization with threads.
12 ring currRing = NULL;
13 
14 void rChangeCurrRing(ring r)
15 {
16  #if 0
17  if ((currRing!=NULL)&&(currRing!=r))
18  {
20  }
21  #endif
22  if( r != NULL )
23  {
24  rTest(r);
25 
26  //------------ set global ring vars --------------------------------
27  currRing = r;
28  //------------ global variables related to coefficients ------------
29  assume( r->cf!= NULL );
30  nSetChar(r->cf);
31  //------------ global variables related to polys
32  p_SetGlobals(r);
33  //------------ global variables related to factory -----------------
34  }
35  else
36  {
37  currRing = NULL;
38  }
39 }
40 /*
41 /// internally changes the gloabl ring and resets the relevant
42 /// global variables:
43 /// SHOULD BE DEPRECATED NOW...?
44 void rChangeCurrRing(ring r)
45 {
46  // if (!rMinpolyIsNULL(currRing))
47  // {
48  // omCheckAddr(currRing->cf->minpoly);
49  // }
50  //------------ set global ring vars --------------------------------
51  //currRing = r;
52  if (r != NULL)
53  {
54  rTest(r);
55  //------------ set global ring vars --------------------------------
56 
57  //------------ global variables related to coefficients ------------
58  nSetChar(r->cf);
59 
60  //------------ global variables related to polys -------------------
61  p_SetGlobals(r);
62  //------------ global variables related to factory -----------------
63  }
64 }
65 */
unsigned si_opt_1
Definition: options.c:5
Compatiblity layer for legacy polynomial operations (over currRing)
static FORCE_INLINE void nSetChar(const coeffs r)
initialisations after each ring change
Definition: coeffs.h:437
const ring r
Definition: syzextra.cc:208
#define assume(x)
Definition: mod2.h:405
#define rTest(r)
Definition: ring.h:781
All the auxiliary stuff.
void rChangeCurrRing(ring r)
Definition: polys.cc:14
#define NULL
Definition: omList.c:10
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
#define TEST_RINGDEP_OPTS
Definition: options.h:95
void p_SetGlobals(const ring r, BOOLEAN complete)
set all properties of a new ring - also called by rComplete
Definition: ring.cc:3401