My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
libpolys
polys
nc
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
40
#include "
nc/ncSACache.h
"
// for CCacheHash etc classes
41
42
#include "
monomials/ring.h
"
43
#include "
monomials/p_polys.h
"
44
45
46
void
CGlobalCacheHash::History
(
const
EHistoryType
t,
const
CGlobalCacheHash::CExponent
a,
const
CGlobalCacheHash::CExponent
b
,
const
poly
p
)
47
{
48
#if OUTPUT
49
Print
(
"History: GlobalPair, Action: %s"
, m_Typenames[(
int
)(t)]);
50
PrintLn
();
51
PrintS
(
"Left : "
);
p_Write
(a,
GetBasering
());
52
PrintS
(
"Right: "
);
p_Write
(
b
,
GetBasering
());
53
if
( t ==
MULT_STORE
)
54
{
55
PrintS
(
"Result: "
);
p_Write
(
p
,
GetBasering
());
56
}
57
#endif
58
}
59
60
61
void
CSpecialPairCacheHash::History
(
const
EHistoryType
t,
const
CSpecialPairCacheHash::CExponent
a,
const
CSpecialPairCacheHash::CExponent
b
,
const
poly
p
)
62
{
63
#if OUTPUT
64
Print
(
"History: SpecialPair, Action: %s"
, m_Typenames[(
int
)(t)]);
65
PrintLn
();
66
Print
(
"Left : %d, Right: %d"
, a,
b
);
67
PrintLn
();
68
if
( t ==
MULT_STORE
)
69
{
70
PrintS
(
"Result: "
);
p_Write
(
p
,
GetBasering
());
71
}
72
#endif
73
}
74
75
76
template
class
CCacheHash<int>
;
77
template
class
CCacheHash<spolyrec*>
;
auxiliary.h
All the auxiliary stuff.
p
int p
Definition
cfModGcd.cc:4086
b
CanonicalForm b
Definition
cfModGcd.cc:4111
CCacheHash
Definition
ncSACache.h:17
CCacheHash< poly >::EHistoryType
EHistoryType
Definition
ncSACache.h:31
CCacheHash< poly >::MULT_STORE
@ MULT_STORE
Definition
ncSACache.h:33
CCacheHash< poly >::GetBasering
ring GetBasering() const
Definition
ncSACache.h:25
CGlobalCacheHash::History
virtual void History(const EHistoryType t, const CExponent a, const CExponent b, const poly p=NULL)
Definition
ncSACache.cc:46
CGlobalCacheHash::CExponent
poly CExponent
Definition
ncSACache.h:102
CSpecialPairCacheHash::History
virtual void History(const EHistoryType t, const CExponent a, const CExponent b, const poly p=NULL)
Definition
ncSACache.cc:61
CSpecialPairCacheHash::CExponent
int CExponent
Definition
ncSACache.h:115
Print
#define Print
Definition
emacs.cc:80
ncSACache.h
numbers.h
p_polys.h
p_Write
void p_Write(poly p, ring lmRing, ring tailRing)
Definition
polys0.cc:342
PrintS
void PrintS(const char *s)
Definition
reporter.cc:288
PrintLn
void PrintLn()
Definition
reporter.cc:314
ring.h
Generated on
for My Project by
doxygen 1.17.0
for
Singular