options.h
Go to the documentation of this file.
1 #ifndef OPTIONS_H
2 #define OPTIONS_H
3 /*****************************************
4  * * Computer Algebra System SINGULAR *
5  * *****************************************/
6 /*
7  * ABSTRACT: macros for global options
8  */
9 
10 /*the general set of std-options : si_opt_1(test) */
11 /*the general set of verbose-options : si_opt_2(verbose) */
12 #ifdef __cplusplus
13 extern "C" unsigned si_opt_1; //< NOTE: Original option variable name: test
14 extern "C" unsigned si_opt_2; //< NOTE: Original option variable name: verbose
15 #else
16 extern unsigned si_opt_1;
17 extern unsigned si_opt_2;
18 #endif
19 #define SI_SAVE_OPT(A,B) { A=si_opt_1; B=si_opt_2; }
20 #define SI_SAVE_OPT1(A) { A=si_opt_1; }
21 #define SI_SAVE_OPT2(A) { A=si_opt_2; }
22 #define SI_RESTORE_OPT(A,B) { si_opt_1=A; si_opt_2=B; }
23 #define SI_RESTORE_OPT1(A) { si_opt_1=A; }
24 #define SI_RESTORE_OPT2(A) { si_opt_2=A; }
25 
26 /*
27 ** Set operations (small sets only)
28 */
29 
30 #define Sy_bit(x) ((unsigned)1<<(x))
31 #define Sy_inset(x,s) ((Sy_bit(x)&(s))?TRUE:FALSE)
32 #define BTEST1(a) Sy_inset((a), si_opt_1)
33 #define BVERBOSE(a) Sy_inset((a), si_opt_2)
34 
35 /*
36 ** defines for BITSETs
37 */
38 
39 #define V_QUIET 0
40 #define V_QRING 1
41 #define V_SHOW_MEM 2
42 #define V_YACC 3
43 #define V_REDEFINE 4
44 #define V_READING 5
45 #define V_LOAD_LIB 6
46 #define V_DEBUG_LIB 7
47 #define V_LOAD_PROC 8
48 #define V_DEF_RES 9
49 
50 #define V_SHOW_USE 11
51 #define V_IMAP 12
52 #define V_PROMPT 13
53 #define V_NSB 14
54 #define V_CONTENTSB 15
55 #define V_CANCELUNIT 16
56 #define V_MODPSOLVSB 17
57 #define V_UPTORADICAL 18
58 #define V_FINDMONOM 19
59 #define V_COEFSTRAT 20
60 #define V_IDLIFT 21
61 #define V_LENGTH 22
62 /*23: kDebugPrint */
63 #define V_ALLWARN 24
64 #define V_INTERSECT_ELIM 25
65 #define V_INTERSECT_SYZ 26
66 /* for tests: 27-30 */
67 #define V_DEG_STOP 31
68 
69 
70 #define OPT_PROT 0
71 #define OPT_REDSB 1
72 #define OPT_NOT_BUCKETS 2
73 #define OPT_NOT_SUGAR 3
74 #define OPT_INTERRUPT 4
75 #define OPT_SUGARCRIT 5
76 #define OPT_DEBUG 6
77 #define OPT_REDTHROUGH 7
78 #define OPT_NO_SYZ_MINIM 8
79 #define OPT_RETURN_SB 9
80 #define OPT_FASTHC 10
81 #define OPT_OLDSTD 20
82 
83 #define OPT_STAIRCASEBOUND 22
84 #define OPT_MULTBOUND 23
85 #define OPT_DEGBOUND 24
86 #define OPT_REDTAIL 25
87 #define OPT_INTSTRATEGY 26
88 #define OPT_FINDET 27
89 #define OPT_INFREDTAIL 28
90 #define OPT_SB_1 29
91 #define OPT_NOTREGULARITY 30
92 #define OPT_WEIGHTM 31
93 
94 /* define ring dependent options */
95 #define TEST_RINGDEP_OPTS \
96  (Sy_bit(OPT_INTSTRATEGY) | Sy_bit(OPT_REDTHROUGH) | Sy_bit(OPT_REDTAIL))
97 
98 #define TEST_OPT_PROT BTEST1(OPT_PROT)
99 #define TEST_OPT_REDSB BTEST1(OPT_REDSB)
100 #define TEST_OPT_NOT_BUCKETS BTEST1(OPT_NOT_BUCKETS)
101 #define TEST_OPT_NOT_SUGAR BTEST1(OPT_NOT_SUGAR)
102 #define TEST_OPT_SUGARCRIT BTEST1(OPT_SUGARCRIT)
103 #define TEST_OPT_DEBUG BTEST1(OPT_DEBUG)
104 #define TEST_OPT_FASTHC BTEST1(OPT_FASTHC)
105 #define TEST_OPT_INTSTRATEGY BTEST1(OPT_INTSTRATEGY)
106 #define TEST_OPT_FINDET BTEST1(OPT_FINDET)
107 #define TEST_OPT_RETURN_SB BTEST1(OPT_RETURN_SB)
108 #define TEST_OPT_DEGBOUND BTEST1(OPT_DEGBOUND)
109 #define TEST_OPT_MULTBOUND BTEST1(OPT_MULTBOUND)
110 #define TEST_OPT_STAIRCASEBOUND BTEST1(OPT_STAIRCASEBOUND)
111 #define TEST_OPT_REDTAIL BTEST1(OPT_REDTAIL)
112 #define TEST_OPT_INFREDTAIL BTEST1(OPT_INFREDTAIL)
113 #define TEST_OPT_SB_1 BTEST1(OPT_SB_1)
114 #define TEST_OPT_NOTREGULARITY BTEST1(OPT_NOTREGULARITY)
115 #define TEST_OPT_WEIGHTM BTEST1(OPT_WEIGHTM)
116 #define TEST_OPT_REDTHROUGH BTEST1(OPT_REDTHROUGH)
117 #define TEST_OPT_OLDSTD BTEST1(OPT_OLDSTD)
118 #define TEST_OPT_NO_SYZ_MINIM BTEST1(OPT_NO_SYZ_MINIM)
119 
120 
121 #define TEST_OPT_CONTENTSB BVERBOSE(V_CONTENTSB)
122 #define TEST_OPT_CANCELUNIT BVERBOSE(V_CANCELUNIT)
123 #define TEST_OPT_IDLIFT BVERBOSE(V_IDLIFT)
124 #define TEST_OPT_LENGTH BVERBOSE(V_LENGTH)
125 #define TEST_V_QRING BVERBOSE(V_QRING)
126 #define TEST_V_NSB BVERBOSE(V_NSB)
127 #define TEST_V_QUIET BVERBOSE(V_QUIET)
128 
129 #define TEST_VERB_NSB BVERBOSE(V_NSB)
130 #define TEST_V_DEG_STOP BVERBOSE(V_DEG_STOP)
131 #define TEST_V_MODPSOLVSB BVERBOSE(V_MODPSOLVSB)
132 #define TEST_V_COEFSTRAT BVERBOSE(V_COEFSTRAT)
133 #define TEST_V_UPTORADICAL BVERBOSE(V_UPTORADICAL)
134 #define TEST_V_FINDMONOM BVERBOSE(V_FINDMONOM)
135 #define TEST_V_ALLWARN BVERBOSE(V_ALLWARN)
136 #define TEST_V_INTERSECT_ELIM BVERBOSE(V_INTERSECT_ELIM)
137 #define TEST_V_INTERSECT_SYZ BVERBOSE(V_INTERSECT_SYZ)
138 
139 
140 #endif
unsigned si_opt_2
Definition: options.h:14
unsigned si_opt_1
Definition: options.h:13