64#define DoSetProc(what, field, length, ord) \
65 GenerateProc(#what, what##_Proc, field, length, ord)
74const char*
macros_field[] = {
"n_Copy",
"n_Delete",
"n_Mult",
"n_Add",
"n_Sub",
"n_IsZero",
"n_Equal" ,
"n_Neg",
"n_InpMult",
"n_InpAdd",
NULL};
77{
"p_MemCopy",
"p_MemAdd",
"p_MemSum",
"p_MemDiff",
NULL};
102 printf(
"#ifdef p_Procs_Kernel\n");
106 const char*
module = p_ProcField_2_Module(proc, field);
125 printf(
"#define HAVE_RINGS\n");
126 printf(
"#define HAVE_ZERODIVISORS\n");
130 printf(
"#undef HAVE_RINGS\n");
131 printf(
"#undef HAVE_ZERODIVISORS\n");
136 printf(
"#undef %s__T\n#define %s__T\t%s_%s\n",
143 printf(
"#undef %s__T\n#define %s__T\t%s_%s\n",
150 printf(
"#undef %s__T\n#define %s__T\t%s_%s_%s\n",
156 printf(
"#undef DECLARE_LENGTH\n");
157 printf(
"#undef p_MemAddAdjust__T\n");
160 printf(
"#define DECLARE_LENGTH(what) do {} while (0)\n");
161 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
165 printf(
"#define DECLARE_LENGTH(what) what\n");
167 printf(
"#define p_MemAddAdjust__T(p, r) p_MemAdd_NegWeightAdjust(p, r)\n");
169 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
173 printf(
"#undef DECLARE_ORDSGN\n");
175 printf(
"#define DECLARE_ORDSGN(what) do {} while (0)\n");
177 printf(
"#define DECLARE_ORDSGN(what) what\n");
181 printf(
"#undef DECLARE_LENGTH_2\n");
182 printf(
"#undef p_MemCmp_Bitmask_2\n");
185 printf(
"#define DECLARE_LENGTH_2(what) do {} while (0)\n");
189 printf(
"#define p_MemCmp_Bitmask_2 p_MemCmp_Bitmask_LengthZero\n");
193 printf(
"#define DECLARE_LENGTH_2(what) what \n");
194 printf(
"#define p_MemCmp_Bitmask_2 p_MemCmp_Bitmask_LengthGeneral\n");
196 printf(
"#undef p_MemAddAdjust__T\n");
197 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
201 printf(
"#include \"polys/templates/%s__T.cc\"\n",
s_what);
205 printf(
"#undef HAVE_RINGS\n");
206 printf(
"#undef HAVE_ZERODIVISORS\n");
208#ifndef p_Procs_Static
209 printf(
"#endif // p_Procs_[Kernel|Field*]\n");
227 printf(
"/* -*-c++-*- */\n");
228 printf(
"/***************************************************************\n");
229 printf(
" * This file was generated automatically by p_ProcsGenerate.cc: DO NOT EDIT\n");
231 printf(
" * This file provides the needed implementation of p_Procs for\n");
239 printf(
" * See the end for a summary.\n");
240 printf(
" *******************************************************************/\n");
267 "/***************************************************************\n"
268 "Names of procs for RDEBUG */\n"
287 printf(
"\n #endif // RDEBUG\n\n"
288 "/***************************************************************/\n"
289 "/* Tables for lookup of procedures: */\n");
308 printf(
"\n/***************************************************************");
318#ifndef p_Procs_Static
330 printf(
"*******************************************************************/\n");
unsigned char * proc[NUM_PROC]
const CanonicalForm int s
static BOOLEAN length(leftv result, leftv arg)
#define HAVE_FAST_P_PROCS
#define HAVE_FAST_ZERO_ORD
void GenerateProc(const char *s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord)
const char * macros_length_ord[]
void AddProc(const char *s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord)
int IsKernelProc(p_Proc proc, p_Field field, p_Length length, p_Ord ord)
const char * macros_length[]
const char * macros_field[]
char *** generated_p_procs
int AlreadyHaveProc(p_Proc proc, p_Field field, p_Length length, p_Ord ord)
static int p_ProcDependsOn_Ord(p_Proc proc)
static int index(p_Length length, p_Ord ord)
static int p_ProcDependsOn_Length(p_Proc proc)
@ pp_Mult_Coeff_mm_DivSelectMult_Proc
static const char * p_FieldEnum_2_String(p_Field field)
#define SetProcs(field, length, ord)
static const char * p_OrdEnum_2_String(p_Ord ord)
static const char * p_LengthEnum_2_String(p_Length length)
static const char * p_ProcEnum_2_String(p_Proc proc)
static int IsValidSpec(p_Field field, p_Length length, p_Ord ord)