Loading...
Searching...
No Matches
ncSACache.cc
Go to the documentation of this file.
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/***************************************************************
* File: ncSACache.cc
* Purpose: implementation of special Cache+Hash for Multiplier
* Author: motsak
* Created:
*******************************************************************/
#define MYTEST 0
#if MYTEST
#define OM_CHECK 4
#define OM_TRACK 5
// these settings must be before "mod2.h" in order to work!!!
#endif
#include "misc/auxiliary.h"
#ifndef SING_NDEBUG
#define OUTPUT MYTEST
#else
#define OUTPUT 0
#endif
#if OUTPUT
namespace
{
static const char* m_Typenames[2] = {"lookup", "store"};
}
#endif
#include "coeffs/numbers.h"
#include "nc/ncSACache.h" // for CCacheHash etc classes
#include "monomials/ring.h"
#include "monomials/p_polys.h"
void CGlobalCacheHash::History(const EHistoryType t, const CGlobalCacheHash::CExponent a, const CGlobalCacheHash::CExponent b, const poly p)
{
#if OUTPUT
Print("History: GlobalPair, Action: %s", m_Typenames[(int)(t)]);
PrintLn();
PrintS("Left : "); p_Write(a, GetBasering());
PrintS("Right: "); p_Write(b, GetBasering());
if( t == MULT_STORE )
{
PrintS("Result: "); p_Write(p, GetBasering());
}
#endif
}
void CSpecialPairCacheHash::History(const EHistoryType t, const CSpecialPairCacheHash::CExponent a, const CSpecialPairCacheHash::CExponent b, const poly p)
{
#if OUTPUT
Print("History: SpecialPair, Action: %s", m_Typenames[(int)(t)]);
PrintLn();
Print("Left : %d, Right: %d", a, b);
PrintLn();
if( t == MULT_STORE )
{
PrintS("Result: "); p_Write(p, GetBasering());
}
#endif
}
template class CCacheHash<int>;
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