fieker-DuValspielwiese
Last change
on this file since ec3d9a was
fea494,
checked in by Hans Schoenemann <hannes@…>, 10 years ago
|
format
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Line | |
---|
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 | { |
---|
19 | currRing->options=si_opt_1 & TEST_RINGDEP_OPTS; |
---|
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 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.