 |
My Project
debian-1:4.1.2-p1+ds-2
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "misc/auxiliary.h"
#include "reporter/reporter.h"
#include "polys/templates/p_Procs_Dynamic.h"
#include "polys/templates/p_Procs_Impl.h"
Go to the source code of this file.
|
int | IsKernelProc (p_Proc proc, p_Field field, p_Length length, p_Ord ord) |
|
int | AlreadyHaveProc (p_Proc proc, p_Field field, p_Length length, p_Ord ord) |
|
void | AddProc (const char *s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord) |
|
void | GenerateProc (const char *s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord) |
|
int | main () |
|
|
VAR int | FieldGeneralProcs = 0 |
|
VAR int | FieldIndepProcs = 0 |
|
VAR int | FieldZpProcs = 0 |
|
VAR int | FieldQProcs = 0 |
|
VAR int | RingGeneralProcs = 0 |
|
VAR int | KernelProcs = 0 |
|
VAR int | UnknownProcs = 0 |
|
VAR char *** | generated_p_procs |
|
const char * | macros_field [] = {"n_Copy","n_Delete", "n_Mult", "n_Add", "n_Sub", "n_IsZero", "n_Equal" , "n_Neg", "n_InpMult", "n_InpAdd", NULL} |
|
const char * | macros_length [] |
|
const char * | macros_length_ord [] = {"p_MemCmp", NULL} |
|
VAR int | DummyProcs = 0 |
|
VAR int | NumberOfHaveProcs = 0 |
|
◆ DoSetProc
◆ AddProc()
Definition at line 84 of file p_Procs_Generate.cc.
91 char* s_full_proc_name = (
char*)
malloc(200);
93 sprintf(s_full_proc_name,
"%s__%s_%s_%s", s_what, s_field, s_length, s_ord);
97 printf(
"\n// definition of %s\n", s_full_proc_name);
98 #ifndef p_Procs_Static
102 printf(
"#ifdef p_Procs_Kernel\n");
107 if (strcmp(module,
"FieldGeneral") == 0)
109 else if (strcmp(module,
"FieldIndep") == 0)
111 else if (strcmp(module,
"FieldZp") == 0)
113 else if (strcmp(module,
"FieldQ") == 0)
120 printf(
"#ifdef p_Procs_%s\n", module);
123 if (strcmp(s_field,
"RingGeneral") == 0)
126 printf(
"#define HAVE_RINGS\n");
127 printf(
"#define HAVE_ZERODIVISORS\n");
134 printf(
"#undef HAVE_RINGS\n");
135 printf(
"#undef HAVE_ZERODIVISORS\n");
140 printf(
"#undef %s__T\n#define %s__T\t%s_%s\n",
147 printf(
"#undef %s__T\n#define %s__T\t%s_%s\n",
154 printf(
"#undef %s__T\n#define %s__T\t%s_%s_%s\n",
160 printf(
"#undef DECLARE_LENGTH\n");
161 printf(
"#undef p_MemAddAdjust__T\n");
164 printf(
"#define DECLARE_LENGTH(what) do {} while (0)\n");
165 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
169 printf(
"#define DECLARE_LENGTH(what) what\n");
171 printf(
"#define p_MemAddAdjust__T(p, r) p_MemAdd_NegWeightAdjust(p, r)\n");
173 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
177 printf(
"#undef DECLARE_ORDSGN\n");
179 printf(
"#define DECLARE_ORDSGN(what) do {} while (0)\n");
181 printf(
"#define DECLARE_ORDSGN(what) what\n");
185 printf(
"#undef DECLARE_LENGTH_2\n");
186 printf(
"#undef p_MemCmp_Bitmask_2\n");
189 printf(
"#define DECLARE_LENGTH_2(what) do {} while (0)\n");
193 printf(
"#define p_MemCmp_Bitmask_2 p_MemCmp_Bitmask_LengthZero\n");
197 printf(
"#define DECLARE_LENGTH_2(what) what \n");
198 printf(
"#define p_MemCmp_Bitmask_2 p_MemCmp_Bitmask_LengthGeneral\n");
200 printf(
"#undef p_MemAddAdjust__T\n");
201 printf(
"#define p_MemAddAdjust__T(p, r) do {} while (0)\n");
204 printf(
"#undef %s__T\n#define %s__T %s\n", s_what, s_what, s_full_proc_name);
205 printf(
"#include \"polys/templates/%s__T.cc\"\n", s_what);
206 printf(
"#undef %s\n", s_what);
207 if (strcmp(s_field,
"RingGeneral") == 0)
210 printf(
"#undef HAVE_RINGS\n");
211 printf(
"#undef HAVE_ZERODIVISORS\n");
216 #ifndef p_Procs_Static
217 printf(
"#endif // p_Procs_[Kernel|Field*]\n");
◆ AlreadyHaveProc()
◆ GenerateProc()
◆ IsKernelProc()
◆ main()
Definition at line 227 of file p_Procs_Generate.cc.
235 printf(
"/* -*-c++-*- */\n");
236 printf(
"/***************************************************************\n");
237 printf(
" * This file was generated automatically by p_ProcsGenerate.cc: DO NOT EDIT\n");
239 printf(
" * This file provides the needed implementation of p_Procs for\n");
247 printf(
" * See the end for a summary.\n");
248 printf(
" *******************************************************************/\n");
272 #ifdef p_Procs_Static
275 "/***************************************************************\n"
276 "Names of procs for RDEBUG */\n"
287 printf(
"\n\"%s\",",
s);
295 printf(
"\n #endif // RDEBUG\n\n"
296 "/***************************************************************/\n"
297 "/* Tables for lookup of procedures: */\n");
316 printf(
"\n/***************************************************************");
317 printf(
"* Summary:\n");
326 #ifndef p_Procs_Static
333 printf(
"* RingGeneralProcs = %d (in FieldGeneral module)\n",
RingGeneralProcs);
338 printf(
"*******************************************************************/\n");
◆ DummyProcs
◆ FieldGeneralProcs
VAR int FieldGeneralProcs = 0 |
◆ FieldIndepProcs
VAR int FieldIndepProcs = 0 |
◆ FieldQProcs
◆ FieldZpProcs
◆ generated_p_procs
VAR char*** generated_p_procs |
◆ KernelProcs
◆ macros_field
const char* macros_field[] = {"n_Copy","n_Delete", "n_Mult", "n_Add", "n_Sub", "n_IsZero", "n_Equal" , "n_Neg", "n_InpMult", "n_InpAdd", NULL} |
◆ macros_length
const char* macros_length[] |
◆ macros_length_ord
const char* macros_length_ord[] = {"p_MemCmp", NULL} |
◆ NumberOfHaveProcs
VAR int NumberOfHaveProcs = 0 |
◆ RingGeneralProcs
VAR int RingGeneralProcs = 0 |
◆ UnknownProcs
const char * macros_length_ord[]
const char * macros_length[]
void AddProc(const char *s_what, p_Proc proc, p_Field field, p_Length length, p_Ord ord)
static const char * p_ProcEnum_2_String(p_Proc proc)
static const char * p_ProcField_2_Module(p_Proc proc, p_Field field)
static BOOLEAN length(leftv result, leftv arg)
static const char * p_LengthEnum_2_String(p_Length length)
static const char * p_OrdEnum_2_String(p_Ord ord)
VAR int NumberOfHaveProcs
VAR char *** generated_p_procs
static int IsValidSpec(p_Field field, p_Length length, p_Ord ord)
#define HAVE_FAST_P_PROCS
void * malloc(size_t size)
#define SetProcs(field, length, ord)
#define HAVE_FAST_ZERO_ORD
static int p_ProcDependsOn_Length(p_Proc proc)
VAR int FieldGeneralProcs
int IsKernelProc(p_Proc proc, p_Field field, p_Length length, p_Ord ord)
int AlreadyHaveProc(p_Proc proc, p_Field field, p_Length length, p_Ord ord)
static const char * p_FieldEnum_2_String(p_Field field)
const CanonicalForm int s
static int p_ProcDependsOn_Ord(p_Proc proc)
unsigned char * proc[NUM_PROC]
static int index(p_Length length, p_Ord ord)
const char * macros_field[]