ncSACache.cc
Go to the documentation of this file.
1 /****************************************
2 * Computer Algebra System SINGULAR *
3 ****************************************/
4 /***************************************************************
5  * File: ncSACache.cc
6  * Purpose: implementation of special Cache+Hash for Multiplier
7  * Author: motsak
8  * Created:
9  *******************************************************************/
10 
11 #define MYTEST 0
12 
13 #if MYTEST
14 #define OM_CHECK 4
15 #define OM_TRACK 5
16 // these settings must be before "mod2.h" in order to work!!!
17 #endif
18 
19 
20 
21 
22 
23 #include <misc/auxiliary.h>
24 
25 #ifndef SING_NDEBUG
26 #define OUTPUT MYTEST
27 #else
28 #define OUTPUT 0
29 #endif
30 
31 #if OUTPUT
32 namespace
33 {
34  static const char* m_Typenames[2] = {"lookup", "store"};
35 }
36 #endif
37 
38 #include <coeffs/numbers.h>
39 #include "coeffrings.h"
40 
41 #include "nc/ncSACache.h" // for CCacheHash etc classes
42 
43 #include "monomials/ring.h"
44 #include "monomials/p_polys.h"
45 
46 
48 {
49 #if OUTPUT
50  Print("History: GlobalPair, Action: %s", m_Typenames[(int)(t)]);
51  PrintLn();
52  PrintS("Left : "); p_Write(a, GetBasering());
53  PrintS("Right: "); p_Write(b, GetBasering());
54  if( t == MULT_STORE )
55  {
56  PrintS("Result: "); p_Write(p, GetBasering());
57  }
58 #endif
59 }
60 
61 
63 {
64 #if OUTPUT
65  Print("History: SpecialPair, Action: %s", m_Typenames[(int)(t)]);
66  PrintLn();
67  Print("Left : %d, Right: %d", a, b);
68  PrintLn();
69  if( t == MULT_STORE )
70  {
71  PrintS("Result: "); p_Write(p, GetBasering());
72  }
73 #endif
74 }
75 
76 
77 template class CCacheHash<int>;
78 template class CCacheHash<spolyrec*>;
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:327
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
virtual void History(const EHistoryType t, const CExponent a, const CExponent b, const poly p=NULL)
Definition: ncSACache.cc:62
All the auxiliary stuff.
void PrintS(const char *s)
Definition: reporter.cc:294
ring GetBasering() const
Definition: ncSACache.h:27
void p_Write(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:206
polyrec * poly
Definition: hilb.h:10
const poly b
Definition: syzextra.cc:213
virtual void History(const EHistoryType t, const CExponent a, const CExponent b, const poly p=NULL)
Definition: ncSACache.cc:47