10 #ifndef P_PROCS_IMPL_H
11 #define P_PROCS_IMPL_H
44 #ifndef HAVE_FAST_P_PROCS
45 #define HAVE_FAST_P_PROCS 0
53 #ifndef HAVE_FAST_FIELD
54 #define HAVE_FAST_FIELD 0
63 #ifndef HAVE_FAST_LENGTH
64 #define HAVE_FAST_LENGTH 0
74 #define HAVE_FAST_ORD 0
81 #ifndef HAVE_FAST_ZERO_ORD
82 #define HAVE_FAST_ZERO_ORD 0
86 #define HAVE_LENGTH_DIFF
92 #define ZP_COPY_FIELD(field) \
93 (field == FieldZp || field == FieldGF || field == FieldR)
95 #define ZP_COPY_FIELD(field) \
96 (field == FieldZp || field == FieldGF || field == FieldR)
116 #if HAVE_MORE_FIELDS_IMPLEMENTED
147 #define ORD_MAX_N_1 OrdNomog
149 #ifdef HAVE_LENGTH_DIFF
156 #define ORD_MAX_N_2 OrdPomogNeg
161 #ifdef HAVE_LENGTH_DIFF
169 #define ORD_MAX_N_3 OrdNegPosNomog
171 #ifdef HAVE_LENGTH_DIFF
208 case FieldZp:
return "FieldZp";
209 case FieldQ:
return "FieldQ";
210 case FieldR:
return "FieldR";
211 case FieldGF:
return "FieldGF";
212 #if HAVE_MORE_FIELDS_IMPLEMENTED
223 return "NoField_2_String";
241 return "NoLength_2_String";
258 #ifdef HAVE_LENGTH_DIFF
271 return "NoOrd_2_String";
295 return "NoProc_2_String";
355 #ifdef HAVE_LENGTH_DIFF
391 #define IsZeroOrd(ord) 0
392 #define ZeroOrd_2_NonZeroOrd(ord) (ord)
401 #ifdef p_Procs_Static
402 static inline void StaticKernelFilter(
p_Field &field,
p_Length &length,
500 length = (
p_Length) ((
int)length + 1);
567 #ifdef p_Procs_Static
568 StaticKernelFilter(field, length, ord, proc);
630 return index(field, length);
636 return index(field, length, ord);
639 return index(length, ord);
656 #define SetProc(what, field, length, ord) \
659 p_Field t_field = field; \
661 p_Length t_length = length; \
662 FastProcFilter(what##_Proc, t_field, t_length, t_ord); \
663 DoSetProc(what, t_field, t_length, t_ord); \
667 #define SetProcs(field, length, ord) \
670 SetProc(p_Copy, field, length, OrdGeneral); \
671 SetProc(p_Delete, field, LengthGeneral, OrdGeneral); \
672 SetProc(p_ShallowCopyDelete, FieldGeneral, length, OrdGeneral); \
673 SetProc(p_Mult_nn, field, LengthGeneral, OrdGeneral); \
674 SetProc(pp_Mult_nn, field, length, OrdGeneral); \
675 SetProc(pp_Mult_mm, field, length, OrdGeneral); \
676 SetProc(p_Mult_mm, field, length, OrdGeneral); \
677 SetProc(p_Minus_mm_Mult_qq, field, length, ord); \
678 SetProc(pp_Mult_mm_Noether, field, length, ord); \
679 SetProc(p_Add_q, field, length, ord); \
680 SetProc(p_Neg, field, LengthGeneral, OrdGeneral); \
681 SetProc(pp_Mult_Coeff_mm_DivSelect, field, length, OrdGeneral); \
682 SetProc(pp_Mult_Coeff_mm_DivSelectMult, field, length, OrdGeneral); \
683 SetProc(p_Merge_q, FieldGeneral, length, ord); \
684 SetProc(p_kBucketSetLm, field, length, ord); \
689 #define SetProcs_nv(field, length, ord) \
692 SetProc(p_Delete, field, LengthGeneral, OrdGeneral); \
693 SetProc(p_ShallowCopyDelete, FieldGeneral, length, OrdGeneral); \
694 SetProc(p_Copy, field, length, OrdGeneral); \
695 SetProc(p_Add_q, field, length, ord); \
696 SetProc(p_kBucketSetLm, field, length, ord); \
697 SetProc(p_Neg, field, LengthGeneral, OrdGeneral); \
698 SetProc(p_Merge_q, FieldGeneral, length, ord); \
703 #endif // P_PROCS_IMPL_H
static void NCopy__Filter(p_Field &field)
unsigned char * proc[NUM_PROC]
static void pp_Mult_mm_Noether_Filter(p_Field &field, p_Length &length, p_Ord &ord)
static void FastFieldFilter(p_Field &field)
#define ZP_COPY_FIELD(field)
static void FastOrdZeroFilter(p_Ord &ord)
static const char * p_OrdEnum_2_String(p_Ord ord)
static void p_Add_q__Filter(p_Length &length, p_Ord &ord)
static void FastProcFilter(p_Proc proc, p_Field &field, p_Length &length, p_Ord &ord)
static int p_ProcDependsOn_Field(p_Proc proc)
static int IsZeroOrd(p_Ord ord)
static void FastLengthFilter(p_Length &length)
static int IsValidSpec(p_Field field, p_Length length, p_Ord ord)
static int index(p_Length length, p_Ord ord)
static int p_ProcDependsOn_Ord(p_Proc proc)
static const char * p_LengthEnum_2_String(p_Length length)
#define HAVE_FAST_P_PROCS
static const char * p_ProcEnum_2_String(p_Proc proc)
static void FastOrdFilter(p_Ord &ord)
static const char * p_ProcField_2_Module(p_Proc proc, p_Field field)
static p_Ord ZeroOrd_2_NonZeroOrd(p_Ord ord, int strict)
#define HAVE_FAST_ZERO_ORD
static void FastP_ProcsFilter(p_Field &field, p_Length &length, p_Ord &ord, const p_Proc proc)
static int p_ProcDependsOn_Length(p_Proc proc)
static const char * p_FieldEnum_2_String(p_Field field)