46#ifndef HAVE_FAST_P_PROCS
47#define HAVE_FAST_P_PROCS 0
55#ifndef HAVE_FAST_FIELD
56#define HAVE_FAST_FIELD 0
65#ifndef HAVE_FAST_LENGTH
66#define HAVE_FAST_LENGTH 0
76#define HAVE_FAST_ORD 0
83#ifndef HAVE_FAST_ZERO_ORD
84#define HAVE_FAST_ZERO_ORD 0
88#define HAVE_LENGTH_DIFF
93#define ZP_COPY_FIELD(field) \
94 (field == FieldZp || field == FieldGF || field == FieldR)
113#if HAVE_MORE_FIELDS_IMPLEMENTED
142#define ORD_MAX_N_1 OrdNomog
144#ifdef HAVE_LENGTH_DIFF
151#define ORD_MAX_N_2 OrdPomogNeg
156#ifdef HAVE_LENGTH_DIFF
164#define ORD_MAX_N_3 OrdNegPosNomog
166#ifdef HAVE_LENGTH_DIFF
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
216 return "NoField_2_String";
234 return "NoLength_2_String";
251#ifdef HAVE_LENGTH_DIFF
264 return "NoOrd_2_String";
288 return "NoProc_2_String";
348#ifdef HAVE_LENGTH_DIFF
384#define IsZeroOrd(ord) 0
385#define ZeroOrd_2_NonZeroOrd(ord) (ord)
637 printf(
"error in index (%d)- should not happen", (
int)
proc);
651#define SetProc(what, field, length, ord) \
654 p_Field t_field = field; \
656 p_Length t_length = length; \
657 FastProcFilter(what##_Proc, t_field, t_length, t_ord); \
658 DoSetProc(what, t_field, t_length, t_ord); \
662#define SetProcs(field, length, ord) \
665 SetProc(p_Copy, field, length, OrdGeneral); \
666 SetProc(p_Delete, field, LengthGeneral, OrdGeneral); \
667 SetProc(p_ShallowCopyDelete, FieldGeneral, length, OrdGeneral); \
668 SetProc(p_Mult_nn, field, LengthGeneral, OrdGeneral); \
669 SetProc(pp_Mult_nn, field, length, OrdGeneral); \
670 SetProc(pp_Mult_mm, field, length, OrdGeneral); \
671 SetProc(p_Mult_mm, field, length, OrdGeneral); \
672 SetProc(p_Minus_mm_Mult_qq, field, length, ord); \
673 SetProc(pp_Mult_mm_Noether, field, length, ord); \
674 SetProc(p_Add_q, field, length, ord); \
675 SetProc(p_Neg, field, LengthGeneral, OrdGeneral); \
676 SetProc(pp_Mult_Coeff_mm_DivSelect, field, length, OrdGeneral); \
677 SetProc(pp_Mult_Coeff_mm_DivSelectMult, field, length, OrdGeneral); \
678 SetProc(p_Merge_q, FieldGeneral, length, ord); \
679 SetProc(p_kBucketSetLm, field, length, ord); \
684#define SetProcs_nv(field, length, ord) \
687 SetProc(p_Delete, field, LengthGeneral, OrdGeneral); \
688 SetProc(p_ShallowCopyDelete, FieldGeneral, length, OrdGeneral); \
689 SetProc(p_Copy, field, length, OrdGeneral); \
690 SetProc(p_Add_q, field, length, ord); \
691 SetProc(p_kBucketSetLm, field, length, ord); \
692 SetProc(p_Neg, field, LengthGeneral, OrdGeneral); \
693 SetProc(p_Merge_q, FieldGeneral, length, ord); \
698#define SetProcs_ring(field, length, ord) \
701 SetProc(p_Copy, FieldGeneral, length, OrdGeneral); \
702 SetProc(p_Delete, FieldGeneral, LengthGeneral, OrdGeneral); \
703 SetProc(p_ShallowCopyDelete, FieldGeneral, length, OrdGeneral); \
704 SetProc(p_Add_q, FieldGeneral, length, ord); \
705 SetProc(p_Neg, FieldGeneral, LengthGeneral, OrdGeneral); \
706 SetProc(p_Merge_q, FieldGeneral, length, ord); \
707 SetProc(p_Mult_nn, field, LengthGeneral, OrdGeneral); \
708 SetProc(pp_Mult_nn, field, LengthGeneral, OrdGeneral); \
709 SetProc(pp_Mult_mm, field, length, OrdGeneral); \
710 SetProc(p_Mult_mm, field, length, OrdGeneral); \
711 SetProc(p_Minus_mm_Mult_qq, field, length, ord); \
712 SetProc(pp_Mult_mm_Noether, field, length, ord); \
713 SetProc(pp_Mult_Coeff_mm_DivSelect, field, length, OrdGeneral); \
714 SetProc(pp_Mult_Coeff_mm_DivSelectMult, field, length, OrdGeneral); \
unsigned char * proc[NUM_PROC]
static BOOLEAN length(leftv result, leftv arg)
static int p_ProcDependsOn_Ord(p_Proc proc)
static void FastOrdZeroFilter(p_Ord &ord)
static int index(p_Length length, p_Ord ord)
static int p_ProcDependsOn_Field(p_Proc proc)
static void p_Neg__Filter(p_Field &field, p_Length &length, p_Ord &ord)
static const char * p_ProcField_2_Module(p_Proc proc, p_Field field)
static void pp_Mult_mm_Noether_Filter(p_Field &field, p_Length &length, p_Ord &ord)
static void FastFieldFilter(p_Field &field)
static int IsZeroOrd(p_Ord ord)
#define HAVE_FAST_P_PROCS
static int p_ProcDependsOn_Length(p_Proc proc)
@ p_ShallowCopyDelete_Proc
@ pp_Mult_Coeff_mm_DivSelect_Proc
@ pp_Mult_Coeff_mm_DivSelectMult_Proc
@ p_Minus_mm_Mult_qq_Proc
@ pp_Mult_mm_Noether_Proc
static void FastP_ProcsFilter(p_Field &field, p_Length &length, p_Ord &ord, const p_Proc proc)
#define HAVE_FAST_ZERO_ORD
#define ZP_COPY_FIELD(field)
static const char * p_FieldEnum_2_String(p_Field field)
static p_Ord ZeroOrd_2_NonZeroOrd(p_Ord ord, int strict)
static void NCopy__Filter(p_Field &field)
static void p_Add_q__Filter(p_Field &field, p_Length &length, p_Ord &ord)
static const char * p_OrdEnum_2_String(p_Ord ord)
static void FastLengthFilter(p_Length &length)
static const char * p_LengthEnum_2_String(p_Length length)
static void FastOrdFilter(p_Ord &ord)
static void FastProcFilter(p_Proc proc, p_Field &field, p_Length &length, p_Ord &ord)
static const char * p_ProcEnum_2_String(p_Proc proc)
static int IsValidSpec(p_Field field, p_Length length, p_Ord ord)