My Project
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
p_Procs_Impl.h File Reference
#include "misc/auxiliary.h"

Go to the source code of this file.

Macros

#define HAVE_FAST_P_PROCS   0
 
#define HAVE_FAST_FIELD   0
 
#define HAVE_FAST_LENGTH   0
 
#define HAVE_FAST_ORD   0
 
#define HAVE_FAST_ZERO_ORD   0
 
#define HAVE_LENGTH_DIFF
 
#define ZP_COPY_FIELD(field)    (field == FieldZp || field == FieldGF || field == FieldR)
 
#define ORD_MAX_N_1   OrdNomog
 
#define ORD_MAX_N_2   OrdPomogNeg
 
#define ORD_MAX_N_3   OrdNegPosNomog
 
#define SetProc(what, field, length, ord)
 
#define SetProcs(field, length, ord)
 
#define SetProcs_ring(field, length, ord)
 

Enumerations

enum  p_Field {
  FieldGeneral = 0 , FieldZp , FieldQ , FieldR ,
  FieldGF , FieldLong_R , FieldLong_C , FieldZp_a ,
  FieldQ_a , RingGeneral , FieldUnknown
}
 
enum  p_Length {
  LengthGeneral = 0 , LengthEight , LengthSeven , LengthSix ,
  LengthFive , LengthFour , LengthThree , LengthTwo ,
  LengthOne , LengthUnknown
}
 
enum  p_Ord {
  OrdGeneral = 0 , OrdPomog , OrdNomog , OrdPomogZero ,
  OrdNomogZero , OrdNegPomog , OrdPomogNeg , OrdPosNomog ,
  OrdNomogPos , OrdNegPomogZero , OrdPomogNegZero , OrdPosPosNomog ,
  OrdPosNomogPos , OrdNegPosNomog , OrdNomogPosZero , OrdPosNomogZero ,
  OrdPosPosNomogZero , OrdPosNomogPosZero , OrdNegPosNomogZero , OrdUnknown
}
 
enum  p_Proc {
  p_Copy_Proc = 0 , p_Delete_Proc , p_ShallowCopyDelete_Proc , p_Mult_nn_Proc ,
  pp_Mult_nn_Proc , pp_Mult_mm_Proc , pp_Mult_mm_Noether_Proc , p_Mult_mm_Proc ,
  p_Add_q_Proc , p_Minus_mm_Mult_qq_Proc , p_Neg_Proc , pp_Mult_Coeff_mm_DivSelect_Proc ,
  pp_Mult_Coeff_mm_DivSelectMult_Proc , p_Merge_q_Proc , p_kBucketSetLm_Proc , p_Unknown_Proc
}
 

Functions

static const char * p_FieldEnum_2_String (p_Field field)
 
static const char * p_LengthEnum_2_String (p_Length length)
 
static const char * p_OrdEnum_2_String (p_Ord ord)
 
static const char * p_ProcEnum_2_String (p_Proc proc)
 
static int p_ProcDependsOn_Field (p_Proc proc)
 
static int p_ProcDependsOn_Ord (p_Proc proc)
 
static int p_ProcDependsOn_Length (p_Proc proc)
 
static const char * p_ProcField_2_Module (p_Proc proc, p_Field field)
 
static int IsZeroOrd (p_Ord ord)
 
static p_Ord ZeroOrd_2_NonZeroOrd (p_Ord ord, int strict)
 
static void FastP_ProcsFilter (p_Field &field, p_Length &length, p_Ord &ord, const p_Proc proc)
 
static void FastFieldFilter (p_Field &field)
 
static void FastLengthFilter (p_Length &length)
 
static void FastOrdFilter (p_Ord &ord)
 
static void FastOrdZeroFilter (p_Ord &ord)
 
static void NCopy__Filter (p_Field &field)
 
static void p_Add_q__Filter (p_Field &field, p_Length &length, p_Ord &ord)
 
static void p_Neg__Filter (p_Field &field, p_Length &length, p_Ord &ord)
 
static void pp_Mult_mm_Noether_Filter (p_Field &field, p_Length &length, p_Ord &ord)
 
static void FastProcFilter (p_Proc proc, p_Field &field, p_Length &length, p_Ord &ord)
 
static int IsValidSpec (p_Field field, p_Length length, p_Ord ord)
 
static int index (p_Length length, p_Ord ord)
 
static int index (p_Field field, p_Length length)
 
static int index (p_Field field, p_Length length, p_Ord ord)
 
static int index (p_Proc proc, p_Field field, p_Length length, p_Ord ord)
 

Macro Definition Documentation

◆ HAVE_FAST_FIELD

#define HAVE_FAST_FIELD   0

Definition at line 56 of file p_Procs_Impl.h.

◆ HAVE_FAST_LENGTH

#define HAVE_FAST_LENGTH   0

Definition at line 66 of file p_Procs_Impl.h.

◆ HAVE_FAST_ORD

#define HAVE_FAST_ORD   0

Definition at line 76 of file p_Procs_Impl.h.

◆ HAVE_FAST_P_PROCS

#define HAVE_FAST_P_PROCS   0

Definition at line 47 of file p_Procs_Impl.h.

◆ HAVE_FAST_ZERO_ORD

#define HAVE_FAST_ZERO_ORD   0

Definition at line 84 of file p_Procs_Impl.h.

◆ HAVE_LENGTH_DIFF

#define HAVE_LENGTH_DIFF

Definition at line 88 of file p_Procs_Impl.h.

◆ ORD_MAX_N_1

#define ORD_MAX_N_1   OrdNomog

Definition at line 142 of file p_Procs_Impl.h.

◆ ORD_MAX_N_2

#define ORD_MAX_N_2   OrdPomogNeg

Definition at line 151 of file p_Procs_Impl.h.

◆ ORD_MAX_N_3

#define ORD_MAX_N_3   OrdNegPosNomog

Definition at line 164 of file p_Procs_Impl.h.

◆ SetProc

#define SetProc (   what,
  field,
  length,
  ord 
)
Value:
do \
{ \
p_Field t_field = field; \
p_Ord t_ord = ord; \
p_Length t_length = length; \
FastProcFilter(what##_Proc, t_field, t_length, t_ord); \
DoSetProc(what, t_field, t_length, t_ord); \
} \
while (0) \
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
p_Length
Definition: p_Procs_Impl.h:123
p_Field
Definition: p_Procs_Impl.h:107
p_Ord
Definition: p_Procs_Impl.h:136

Definition at line 651 of file p_Procs_Impl.h.

◆ SetProcs

#define SetProcs (   field,
  length,
  ord 
)
Value:
do \
{ \
SetProc(p_Copy, field, length, OrdGeneral); \
SetProc(p_Delete, field, LengthGeneral, OrdGeneral); \
SetProc(p_Mult_nn, field, LengthGeneral, OrdGeneral); \
SetProc(pp_Mult_nn, field, length, OrdGeneral); \
SetProc(pp_Mult_mm, field, length, OrdGeneral); \
SetProc(p_Mult_mm, field, length, OrdGeneral); \
SetProc(p_Minus_mm_Mult_qq, field, length, ord); \
SetProc(pp_Mult_mm_Noether, field, length, ord); \
SetProc(p_Add_q, field, length, ord); \
SetProc(p_Neg, field, LengthGeneral, OrdGeneral); \
SetProc(pp_Mult_Coeff_mm_DivSelectMult, field, length, OrdGeneral); \
SetProc(p_Merge_q, FieldGeneral, length, ord); \
SetProc(p_kBucketSetLm, field, length, ord); \
} \
while (0)
@ LengthGeneral
Definition: p_Procs_Impl.h:124
@ FieldGeneral
Definition: p_Procs_Impl.h:108
@ OrdGeneral
Definition: p_Procs_Impl.h:137
static poly p_Neg(poly p, const ring r)
Definition: p_polys.h:1105
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:934
static poly pp_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:1029
static poly p_Merge_q(poly p, poly q, const ring r)
Definition: p_polys.h:1210
static poly pp_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:990
static poly p_ShallowCopyDelete(poly p, const ring r, omBin bin)
Definition: p_polys.h:926
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:956
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:899
static poly p_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:1049
static poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq, const poly spNoether, const ring r)
Definition: p_polys.h:1068
static poly pp_Mult_Coeff_mm_DivSelect(poly p, const poly m, const ring r)
Definition: p_polys.h:1088
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:844

Definition at line 662 of file p_Procs_Impl.h.

◆ SetProcs_ring

#define SetProcs_ring (   field,
  length,
  ord 
)
Value:
do \
{ \
SetProc(p_Add_q, FieldGeneral, length, ord); \
SetProc(p_Merge_q, FieldGeneral, length, ord); \
SetProc(p_Mult_nn, field, LengthGeneral, OrdGeneral); \
SetProc(pp_Mult_nn, field, LengthGeneral, OrdGeneral); \
SetProc(pp_Mult_mm, field, length, OrdGeneral); \
SetProc(p_Mult_mm, field, length, OrdGeneral); \
SetProc(p_Minus_mm_Mult_qq, field, length, ord); \
SetProc(pp_Mult_mm_Noether, field, length, ord); \
SetProc(pp_Mult_Coeff_mm_DivSelectMult, field, length, OrdGeneral); \
} \
while (0)

Definition at line 698 of file p_Procs_Impl.h.

◆ ZP_COPY_FIELD

#define ZP_COPY_FIELD (   field)     (field == FieldZp || field == FieldGF || field == FieldR)

Definition at line 93 of file p_Procs_Impl.h.

Enumeration Type Documentation

◆ p_Field

enum p_Field
Enumerator
FieldGeneral 
FieldZp 
FieldQ 
FieldR 
FieldGF 
FieldLong_R 
FieldLong_C 
FieldZp_a 
FieldQ_a 
RingGeneral 
FieldUnknown 

Definition at line 106 of file p_Procs_Impl.h.

107{
108 FieldGeneral = 0,
109 FieldZp,
110 FieldQ,
111 FieldR,
112 FieldGF,
113#if HAVE_MORE_FIELDS_IMPLEMENTED
116 FieldZp_a,
117 FieldQ_a,
118#endif
121} p_Field;
@ FieldUnknown
Definition: p_Procs_Impl.h:120
@ FieldQ
Definition: p_Procs_Impl.h:110
@ FieldZp
Definition: p_Procs_Impl.h:109
@ RingGeneral
Definition: p_Procs_Impl.h:119
@ FieldZp_a
Definition: p_Procs_Impl.h:116
@ FieldQ_a
Definition: p_Procs_Impl.h:117
@ FieldLong_R
Definition: p_Procs_Impl.h:114
@ FieldLong_C
Definition: p_Procs_Impl.h:115
@ FieldR
Definition: p_Procs_Impl.h:111
@ FieldGF
Definition: p_Procs_Impl.h:112

◆ p_Length

enum p_Length
Enumerator
LengthGeneral 
LengthEight 
LengthSeven 
LengthSix 
LengthFive 
LengthFour 
LengthThree 
LengthTwo 
LengthOne 
LengthUnknown 

Definition at line 122 of file p_Procs_Impl.h.

123{
124 LengthGeneral = 0, // n >= 1
125 LengthEight, // n == 8
127 LengthSix,
131 LengthTwo,
132 LengthOne,
134} p_Length;
@ LengthFive
Definition: p_Procs_Impl.h:128
@ LengthUnknown
Definition: p_Procs_Impl.h:133
@ LengthFour
Definition: p_Procs_Impl.h:129
@ LengthThree
Definition: p_Procs_Impl.h:130
@ LengthEight
Definition: p_Procs_Impl.h:125
@ LengthSix
Definition: p_Procs_Impl.h:127
@ LengthOne
Definition: p_Procs_Impl.h:132
@ LengthSeven
Definition: p_Procs_Impl.h:126
@ LengthTwo
Definition: p_Procs_Impl.h:131

◆ p_Ord

enum p_Ord
Enumerator
OrdGeneral 
OrdPomog 
OrdNomog 
OrdPomogZero 
OrdNomogZero 
OrdNegPomog 
OrdPomogNeg 
OrdPosNomog 
OrdNomogPos 
OrdNegPomogZero 
OrdPomogNegZero 
OrdPosPosNomog 
OrdPosNomogPos 
OrdNegPosNomog 
OrdNomogPosZero 
OrdPosNomogZero 
OrdPosPosNomogZero 
OrdPosNomogPosZero 
OrdNegPosNomogZero 
OrdUnknown 

Definition at line 135 of file p_Procs_Impl.h.

136{
137 OrdGeneral = 0,
138 // ordsgn
139 // 0 1 i n-1 n n_min Example
140 OrdPomog, // + + + + + 1 (lp,C)
141 OrdNomog, // - - - - - 1 (ls, c), (ds, c)
142#define ORD_MAX_N_1 OrdNomog
143
144#ifdef HAVE_LENGTH_DIFF
145 OrdPomogZero, // + + + + 0 2 (Dp, C), Even vars
146 OrdNomogZero, // - - - - 0 2 (ds, c), Even vars
147#endif
148
149 OrdNegPomog, // - + + + + 2 (c, lp), (Ds, c)
150 OrdPomogNeg, // + + + + - 2 (lp, c)
151#define ORD_MAX_N_2 OrdPomogNeg
152
153 OrdPosNomog, // + - - - + 3 (dp, c) (for n == 2, use PomogNeg)
154 OrdNomogPos, // - - - - + 3 (ls, C) (for n == 2, use NegPomog)
155
156#ifdef HAVE_LENGTH_DIFF
157 OrdNegPomogZero, // - + + + 0 3 (c, lp), (Ds, c)
158 OrdPomogNegZero, // + + + - 0 3 (lp, c)
159#endif
160
161 OrdPosPosNomog, // + + - - - 3 (C, dp)
162 OrdPosNomogPos, // + - - - + 3 (dp, C)
163 OrdNegPosNomog, // - + - - - 3 (c, dp)
164#define ORD_MAX_N_3 OrdNegPosNomog
165
166#ifdef HAVE_LENGTH_DIFF
167 OrdNomogPosZero, // - - - + 0 4 (ls, C) (for n == 3, use NegPomogZero)
168 OrdPosNomogZero, // + - - - 0 4 (dp, c) (for n == 3, use PomogNegZero)
169
170 OrdPosPosNomogZero,// + + - - 0 4 (C, dp)
171 OrdPosNomogPosZero,// + - - + 0 4 (dp, C)
172 OrdNegPosNomogZero,// - + - - 0 4 (c, dp)
173#endif
174
176} p_Ord;
@ OrdNomogZero
Definition: p_Procs_Impl.h:146
@ OrdPomogNegZero
Definition: p_Procs_Impl.h:158
@ OrdPosNomog
Definition: p_Procs_Impl.h:153
@ OrdNegPomogZero
Definition: p_Procs_Impl.h:157
@ OrdPosNomogPosZero
Definition: p_Procs_Impl.h:171
@ OrdNegPomog
Definition: p_Procs_Impl.h:149
@ OrdPomogNeg
Definition: p_Procs_Impl.h:150
@ OrdPomog
Definition: p_Procs_Impl.h:140
@ OrdUnknown
Definition: p_Procs_Impl.h:175
@ OrdPosNomogZero
Definition: p_Procs_Impl.h:168
@ OrdPosPosNomogZero
Definition: p_Procs_Impl.h:170
@ OrdPosNomogPos
Definition: p_Procs_Impl.h:162
@ OrdNomog
Definition: p_Procs_Impl.h:141
@ OrdNegPosNomogZero
Definition: p_Procs_Impl.h:172
@ OrdNomogPos
Definition: p_Procs_Impl.h:154
@ OrdPomogZero
Definition: p_Procs_Impl.h:145
@ OrdPosPosNomog
Definition: p_Procs_Impl.h:161
@ OrdNegPosNomog
Definition: p_Procs_Impl.h:163
@ OrdNomogPosZero
Definition: p_Procs_Impl.h:167

◆ p_Proc

enum p_Proc
Enumerator
p_Copy_Proc 
p_Delete_Proc 
p_ShallowCopyDelete_Proc 
p_Mult_nn_Proc 
pp_Mult_nn_Proc 
pp_Mult_mm_Proc 
pp_Mult_mm_Noether_Proc 
p_Mult_mm_Proc 
p_Add_q_Proc 
p_Minus_mm_Mult_qq_Proc 
p_Neg_Proc 
pp_Mult_Coeff_mm_DivSelect_Proc 
pp_Mult_Coeff_mm_DivSelectMult_Proc 
p_Merge_q_Proc 
p_kBucketSetLm_Proc 
p_Unknown_Proc 

Definition at line 178 of file p_Procs_Impl.h.

179{
180 p_Copy_Proc = 0,
196} p_Proc;
p_Proc
Definition: p_Procs_Impl.h:179
@ p_ShallowCopyDelete_Proc
Definition: p_Procs_Impl.h:182
@ p_Delete_Proc
Definition: p_Procs_Impl.h:181
@ p_kBucketSetLm_Proc
Definition: p_Procs_Impl.h:194
@ p_Neg_Proc
Definition: p_Procs_Impl.h:190
@ p_Mult_nn_Proc
Definition: p_Procs_Impl.h:183
@ p_Mult_mm_Proc
Definition: p_Procs_Impl.h:187
@ pp_Mult_nn_Proc
Definition: p_Procs_Impl.h:184
@ pp_Mult_Coeff_mm_DivSelect_Proc
Definition: p_Procs_Impl.h:191
@ p_Merge_q_Proc
Definition: p_Procs_Impl.h:193
@ p_Copy_Proc
Definition: p_Procs_Impl.h:180
@ p_Add_q_Proc
Definition: p_Procs_Impl.h:188
@ pp_Mult_mm_Proc
Definition: p_Procs_Impl.h:185
@ pp_Mult_Coeff_mm_DivSelectMult_Proc
Definition: p_Procs_Impl.h:192
@ p_Minus_mm_Mult_qq_Proc
Definition: p_Procs_Impl.h:189
@ pp_Mult_mm_Noether_Proc
Definition: p_Procs_Impl.h:186
@ p_Unknown_Proc
Definition: p_Procs_Impl.h:195

Function Documentation

◆ FastFieldFilter()

static void FastFieldFilter ( p_Field field)
inlinestatic

Definition at line 431 of file p_Procs_Impl.h.

432{
433 if (HAVE_FAST_FIELD <= 0 ||
434 (HAVE_FAST_FIELD == 1 && field != FieldZp) ||
435 (field != FieldZp && field != FieldQ))
436 if (field != RingGeneral) field = FieldGeneral;
437}
#define HAVE_FAST_FIELD
Definition: p_Procs_Impl.h:56

◆ FastLengthFilter()

static void FastLengthFilter ( p_Length length)
inlinestatic

Definition at line 439 of file p_Procs_Impl.h.

440{
441 if ((HAVE_FAST_LENGTH == 3 && length <= LengthFive) ||
442 (HAVE_FAST_LENGTH == 2 && length <= LengthFour) ||
443 (HAVE_FAST_LENGTH == 1 && length <= LengthTwo) ||
444 (HAVE_FAST_LENGTH <= 0))
445 {
447 }
448}
#define HAVE_FAST_LENGTH
Definition: p_Procs_Impl.h:66

◆ FastOrdFilter()

static void FastOrdFilter ( p_Ord ord)
inlinestatic

Definition at line 450 of file p_Procs_Impl.h.

451{
452 if ((HAVE_FAST_ORD == 3 && ord >= OrdNomogPosZero) ||
453 (HAVE_FAST_ORD == 2 && ord >= OrdPosNomog) ||
454 (HAVE_FAST_ORD == 1 && ord >= OrdPomogZero) ||
455 (HAVE_FAST_ORD <= 0))
456 ord = OrdGeneral;
457}
#define HAVE_FAST_ORD
Definition: p_Procs_Impl.h:76

◆ FastOrdZeroFilter()

static void FastOrdZeroFilter ( p_Ord ord)
inlinestatic

Definition at line 459 of file p_Procs_Impl.h.

460{
461 if (IsZeroOrd(ord))
462 {
463 if ((HAVE_FAST_ZERO_ORD == 1 && (ord != OrdPosNomogPosZero &&
464 ord != OrdNomogPosZero &&
465 ord != OrdPomogNegZero)) ||
466 (HAVE_FAST_ZERO_ORD <= 0))
467 ord = ZeroOrd_2_NonZeroOrd(ord, 1);
468 }
469}
static int IsZeroOrd(p_Ord ord)
Definition: p_Procs_Impl.h:349
#define HAVE_FAST_ZERO_ORD
Definition: p_Procs_Impl.h:84
static p_Ord ZeroOrd_2_NonZeroOrd(p_Ord ord, int strict)
Definition: p_Procs_Impl.h:358

◆ FastP_ProcsFilter()

static void FastP_ProcsFilter ( p_Field field,
p_Length length,
p_Ord ord,
const p_Proc  proc 
)
inlinestatic

Definition at line 410 of file p_Procs_Impl.h.

411{
412 if (HAVE_FAST_P_PROCS >= 5) return;
413
414 if (HAVE_FAST_P_PROCS < 3 && field == FieldQ)
415 field = FieldGeneral;
416
417 if ((HAVE_FAST_P_PROCS == 0) ||
418 (HAVE_FAST_P_PROCS <= 4 && field != FieldZp && field != FieldQ &&
420 {
421 if (field != RingGeneral) field = FieldGeneral;
423 ord = OrdGeneral;
424 return;
425 }
426 if (HAVE_FAST_P_PROCS == 1 ||
427 (HAVE_FAST_P_PROCS == 4 && field != FieldZp && proc != p_Merge_q_Proc))
428 ord = OrdGeneral;
429}
unsigned char * proc[NUM_PROC]
Definition: checklibs.c:16
#define HAVE_FAST_P_PROCS
Definition: p_Procs_Impl.h:47

◆ FastProcFilter()

static void FastProcFilter ( p_Proc  proc,
p_Field field,
p_Length length,
p_Ord ord 
)
inlinestatic

Definition at line 518 of file p_Procs_Impl.h.

520{
521 switch(proc)
522 {
523 case p_Add_q_Proc:
524 case p_Merge_q_Proc:
525 p_Add_q__Filter(field, length, ord);
526 break;
527
528 case p_Neg_Proc:
529 p_Neg__Filter(field, length, ord);
530 break;
531
532 case p_Copy_Proc:
533 case p_Delete_Proc:
534 NCopy__Filter(field);
535 break;
536
539 break;
540
542 if (length == LengthOne || length == LengthTwo)
543 {
544 if (field != RingGeneral) field = FieldGeneral;
546 ord = OrdGeneral;
547 return;
548 }
549 break;
550
551 default: break;
552 }
553
554 FastOrdFilter(ord);
557 FastFieldFilter(field);
558 FastP_ProcsFilter(field, length, ord, proc);
559#ifdef p_Procs_Static
560 StaticKernelFilter(field, length, ord, proc);
561#endif
562}
static void FastOrdZeroFilter(p_Ord &ord)
Definition: p_Procs_Impl.h:459
static void p_Neg__Filter(p_Field &field, p_Length &length, p_Ord &ord)
Definition: p_Procs_Impl.h:492
static void pp_Mult_mm_Noether_Filter(p_Field &field, p_Length &length, p_Ord &ord)
Definition: p_Procs_Impl.h:499
static void FastFieldFilter(p_Field &field)
Definition: p_Procs_Impl.h:431
static void FastP_ProcsFilter(p_Field &field, p_Length &length, p_Ord &ord, const p_Proc proc)
Definition: p_Procs_Impl.h:410
static void NCopy__Filter(p_Field &field)
Definition: p_Procs_Impl.h:471
static void p_Add_q__Filter(p_Field &field, p_Length &length, p_Ord &ord)
Definition: p_Procs_Impl.h:479
static void FastLengthFilter(p_Length &length)
Definition: p_Procs_Impl.h:439
static void FastOrdFilter(p_Ord &ord)
Definition: p_Procs_Impl.h:450

◆ index() [1/4]

static int index ( p_Field  field,
p_Length  length 
)
inlinestatic

Definition at line 597 of file p_Procs_Impl.h.

598{
599 return field*LengthUnknown + length;
600}

◆ index() [2/4]

static int index ( p_Field  field,
p_Length  length,
p_Ord  ord 
)
inlinestatic

Definition at line 602 of file p_Procs_Impl.h.

603{
604 return field*LengthUnknown*OrdUnknown + length*OrdUnknown + ord;
605}

◆ index() [3/4]

static int index ( p_Length  length,
p_Ord  ord 
)
inlinestatic

Definition at line 592 of file p_Procs_Impl.h.

593{
594 return length*OrdUnknown + ord;
595}

◆ index() [4/4]

static int index ( p_Proc  proc,
p_Field  field,
p_Length  length,
p_Ord  ord 
)
inlinestatic

Definition at line 607 of file p_Procs_Impl.h.

608{
609 switch(proc)
610 {
611 case p_Delete_Proc:
612 case p_Mult_nn_Proc:
613 case p_Neg_Proc:
614 return field;
615
617 return length;
618
619 case p_Copy_Proc:
620 case pp_Mult_mm_Proc:
621 case p_Mult_mm_Proc:
622 case pp_Mult_nn_Proc:
625 return index(field, length);
626
627 case p_Add_q_Proc:
631 return index(field, length, ord);
632
633 case p_Merge_q_Proc:
634 return index(length, ord);
635
636 default:
637 printf("error in index (%d)- should not happen", (int)proc);
638 return -1;
639 }
640}
static int index(p_Length length, p_Ord ord)
Definition: p_Procs_Impl.h:592

◆ IsValidSpec()

static int IsValidSpec ( p_Field  field,
p_Length  length,
p_Ord  ord 
)
inlinestatic

Definition at line 565 of file p_Procs_Impl.h.

566{
567 if (field == FieldUnknown || length == LengthUnknown || ord == OrdUnknown)
568 return 0;
569
570 if (length >= LengthThree && // i.e. 1, 2, or 3
571 ord > ORD_MAX_N_3) // i.e. OrdNomogPosZero and below
572 return 0;
573
574 if (length >= LengthTwo && // i.e. 1 or 2
575 ord > ORD_MAX_N_2) // i.e. PosNomog and below
576 return 0;
577
578 if (length == LengthOne &&
579 ord > ORD_MAX_N_1) // i.e. PosPomogZero and below
580 return 0;
581
582 // we cover everything for length <= two
583 if (ord == OrdGeneral && length > LengthTwo)
584 return 0;
585#ifndef HAVE_RINGS
586 if (field == RingGeneral) return 0;
587#endif
588 return 1;
589}
#define ORD_MAX_N_2
Definition: p_Procs_Impl.h:151
#define ORD_MAX_N_1
Definition: p_Procs_Impl.h:142
#define ORD_MAX_N_3
Definition: p_Procs_Impl.h:164

◆ IsZeroOrd()

static int IsZeroOrd ( p_Ord  ord)
inlinestatic

Definition at line 349 of file p_Procs_Impl.h.

350{
351 return (ord == OrdPomogZero || ord == OrdNomogZero ||
352 ord == OrdNegPomogZero || ord == OrdPosNomogZero ||
353 ord == OrdPomogNegZero || ord == OrdNomogPosZero ||
354 ord == OrdPosNomogPosZero || ord == OrdPosPosNomogZero ||
355 ord == OrdNegPosNomogZero);
356}

◆ NCopy__Filter()

static void NCopy__Filter ( p_Field field)
inlinestatic

Definition at line 471 of file p_Procs_Impl.h.

472{
473 if (ZP_COPY_FIELD(field)) field = FieldZp;
474 else if (field == RingGeneral) field = FieldGeneral;
475}
#define ZP_COPY_FIELD(field)
Definition: p_Procs_Impl.h:93

◆ p_Add_q__Filter()

static void p_Add_q__Filter ( p_Field field,
p_Length length,
p_Ord ord 
)
inlinestatic

Definition at line 479 of file p_Procs_Impl.h.

480{
481 if (IsZeroOrd(ord))
482 {
483 ord = ZeroOrd_2_NonZeroOrd(ord, 0);
484 if (length > LengthGeneral)
485 {
486 length = (p_Length) ((int)length + 1);
487 }
488 }
489 if (field == RingGeneral) field = FieldGeneral;
490}

◆ p_FieldEnum_2_String()

static const char * p_FieldEnum_2_String ( p_Field  field)
inlinestatic

Definition at line 198 of file p_Procs_Impl.h.

199{
200 switch(field)
201 {
202 case FieldGeneral: return "FieldGeneral";
203 case FieldZp: return "FieldZp";
204 case FieldQ: return "FieldQ";
205 case FieldR: return "FieldR";
206 case FieldGF: return "FieldGF";
207#if HAVE_MORE_FIELDS_IMPLEMENTED
208 case FieldLong_R: return "FieldLong_R";
209 case FieldLong_C: return "FieldLong_C";
210 case FieldZp_a: return "FieldZp_a";
211 case FieldQ_a: return "FieldQ_a";
212#endif
213 case RingGeneral: return "RingGeneral";
214 case FieldUnknown: return "FieldUnknown";
215 }
216 return "NoField_2_String";
217}

◆ p_LengthEnum_2_String()

static const char * p_LengthEnum_2_String ( p_Length  length)
inlinestatic

Definition at line 219 of file p_Procs_Impl.h.

220{
221 switch(length)
222 {
223 case LengthGeneral: return "LengthGeneral";
224 case LengthEight: return "LengthEight";
225 case LengthSeven: return "LengthSeven";
226 case LengthSix: return "LengthSix";
227 case LengthFive: return "LengthFive";
228 case LengthFour: return "LengthFour";
229 case LengthThree: return "LengthThree";
230 case LengthTwo: return "LengthTwo";
231 case LengthOne: return "LengthOne";
232 case LengthUnknown: return "LengthUnknown";
233 }
234 return "NoLength_2_String";
235}

◆ p_Neg__Filter()

static void p_Neg__Filter ( p_Field field,
p_Length length,
p_Ord ord 
)
inlinestatic

Definition at line 492 of file p_Procs_Impl.h.

493{
494 if (field == RingGeneral) field = FieldGeneral;
496 ord =OrdGeneral;
497}

◆ p_OrdEnum_2_String()

static const char * p_OrdEnum_2_String ( p_Ord  ord)
inlinestatic

Definition at line 237 of file p_Procs_Impl.h.

238{
239 switch(ord)
240 {
241 case OrdGeneral: return "OrdGeneral";
242 case OrdPomog: return "OrdPomog";
243 case OrdNomog: return "OrdNomog";
244 case OrdNegPomog: return "OrdNegPomog";
245 case OrdPomogNeg: return "OrdPomogNeg";
246 case OrdPosNomog: return "OrdPosNomog";
247 case OrdNomogPos: return "OrdNomogPos";
248 case OrdPosPosNomog: return "OrdPosPosNomog";
249 case OrdPosNomogPos: return "OrdPosNomogPos";
250 case OrdNegPosNomog: return "OrdNegPosNomog";
251#ifdef HAVE_LENGTH_DIFF
252 case OrdNegPomogZero: return "OrdNegPomogZero";
253 case OrdPomogNegZero: return "OrdPomogNegZero";
254 case OrdPomogZero: return "OrdPomogZero";
255 case OrdNomogZero: return "OrdNomogZero";
256 case OrdNomogPosZero: return "OrdNomogPosZero";
257 case OrdPosNomogZero: return "OrdPosNomogZero";
258 case OrdPosPosNomogZero: return "OrdPosPosNomogZero";
259 case OrdPosNomogPosZero: return "OrdPosNomogPosZero";
260 case OrdNegPosNomogZero: return "OrdNegPosNomogZero";
261#endif
262 case OrdUnknown: return "OrdUnknown";
263 }
264 return "NoOrd_2_String";
265}

◆ p_ProcDependsOn_Field()

static int p_ProcDependsOn_Field ( p_Proc  proc)
inlinestatic

Definition at line 291 of file p_Procs_Impl.h.

292{
295 return 0;
296 return 1;
297}

◆ p_ProcDependsOn_Length()

static int p_ProcDependsOn_Length ( p_Proc  proc)
inlinestatic

Definition at line 315 of file p_Procs_Impl.h.

316{
317 switch(proc)
318 {
319 case p_Delete_Proc:
320 case p_Mult_nn_Proc:
321 case p_Neg_Proc:
322 return 0;
323
324 default:
325 return 1;
326 }
327}

◆ p_ProcDependsOn_Ord()

static int p_ProcDependsOn_Ord ( p_Proc  proc)
inlinestatic

Definition at line 299 of file p_Procs_Impl.h.

300{
301 switch(proc)
302 {
303 case p_Add_q_Proc:
307 case p_Merge_q_Proc:
308 return 1;
309
310 default:
311 return 0;
312 }
313}

◆ p_ProcEnum_2_String()

static const char * p_ProcEnum_2_String ( p_Proc  proc)
inlinestatic

Definition at line 267 of file p_Procs_Impl.h.

268{
269 switch(proc)
270 {
271 case p_Copy_Proc: return "p_Copy_Proc";
272 case p_Delete_Proc: return "p_Delete_Proc";
273 case p_ShallowCopyDelete_Proc: return "p_ShallowCopyDelete_Proc";
274 case p_Mult_nn_Proc: return "p_Mult_nn_Proc";
275 case pp_Mult_nn_Proc: return "pp_Mult_nn_Proc";
276 case pp_Mult_mm_Proc: return "pp_Mult_mm_Proc";
277 case pp_Mult_mm_Noether_Proc: return "pp_Mult_mm_Noether_Proc";
278 case p_Mult_mm_Proc: return "p_Mult_mm_Proc";
279 case p_Add_q_Proc: return "p_Add_q_Proc";
280 case p_Minus_mm_Mult_qq_Proc: return "p_Minus_mm_Mult_qq_Proc";
281 case p_Neg_Proc: return "p_Neg_Proc";
282 case pp_Mult_Coeff_mm_DivSelect_Proc: return "pp_Mult_Coeff_mm_DivSelect_Proc";
283 case pp_Mult_Coeff_mm_DivSelectMult_Proc: return "pp_Mult_Coeff_mm_DivSelectMult_Proc";
284 case p_Merge_q_Proc: return "p_Merge_q_Proc";
285 case p_kBucketSetLm_Proc: return "p_kBucketSetLm_Proc";
286 case p_Unknown_Proc: return "p_Unknown_Proc";
287 }
288 return "NoProc_2_String";
289}

◆ p_ProcField_2_Module()

static const char * p_ProcField_2_Module ( p_Proc  proc,
p_Field  field 
)
inlinestatic

Definition at line 331 of file p_Procs_Impl.h.

332{
334 return "FieldIndep";
335 else
336 {
337 if (field > FieldQ) field = FieldGeneral;
338 return p_FieldEnum_2_String(field);
339 }
340}
static int p_ProcDependsOn_Field(p_Proc proc)
Definition: p_Procs_Impl.h:291
static const char * p_FieldEnum_2_String(p_Field field)
Definition: p_Procs_Impl.h:198

◆ pp_Mult_mm_Noether_Filter()

static void pp_Mult_mm_Noether_Filter ( p_Field field,
p_Length length,
p_Ord ord 
)
inlinestatic

Definition at line 499 of file p_Procs_Impl.h.

501{
502 if (ord == OrdPomog
503 || ord == OrdPomogZero
504 || (ord == OrdPomogNeg && length > LengthTwo)
505#ifdef HAVE_LENGTH_DIFF
506 || (ord == OrdPomogZero)
507 || (ord == OrdPomogNegZero && length > LengthThree)
508#endif
509 )
510 {
511 // all the other orderings might occur (remember Mixed Orderings!)
512 if (field != RingGeneral) field = FieldGeneral;
513 ord = OrdGeneral;
515 }
516}
#define HAVE_LENGTH_DIFF
Definition: p_Procs_Impl.h:88

◆ ZeroOrd_2_NonZeroOrd()

static p_Ord ZeroOrd_2_NonZeroOrd ( p_Ord  ord,
int  strict 
)
inlinestatic

Definition at line 358 of file p_Procs_Impl.h.

359{
360 if (IsZeroOrd(ord))
361 {
362 switch (ord)
363 {
364 case OrdPomogZero: return OrdPomog;
365 case OrdNomogZero: return OrdNomog;
366 case OrdNegPomogZero: return OrdNegPomog;
367 case OrdPosNomogZero: return OrdPosNomog;
370 default:
371 if (strict) return OrdGeneral;
372 else if (ord == OrdPomogNegZero) return OrdPomogNeg;
373 else if (ord == OrdNomogPosZero) return OrdNomogPos;
374 else if (ord == OrdPosNomogPosZero) return OrdPosNomogPos;
375 else return OrdGeneral;
376 }
377 }
378 else
379 {
380 return ord;
381 }
382}