source: git/kernel/ncSACache.cc @ 76e501

spielwiese
Last change on this file since 76e501 was 599326, checked in by Kai Krüger <krueger@…>, 14 years ago
Anne, Kai, Frank: - changes to #include "..." statements to allow cleaner build structure - affected directories: omalloc, kernel, Singular - not yet done: IntergerProgramming git-svn-id: file:///usr/local/Singular/svn/trunk@13032 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
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 *  Version: $Id$
10 *******************************************************************/
11
12#define MYTEST 0
13
14#if MYTEST
15#define OM_CHECK 4
16#define OM_TRACK 5
17// these settings must be before "mod2.h" in order to work!!!
18#endif
19
20
21#include <kernel/mod2.h>
22
23#ifndef NDEBUG
24#define OUTPUT 1
25#else
26#define OUTPUT 0
27#endif
28
29
30
31#include <ncSACache.h> // for CCacheHash etc classes
32
33#include <ring.h>
34#include <p_polys.h>
35
36static const char* m_Typenames[2] = {"lookup", "store"};
37
38void CGlobalCacheHash::History(const EHistoryType t, const CGlobalCacheHash::CExponent a, const CGlobalCacheHash::CExponent b, const poly p)
39{
40#if OUTPUT
41  Print("History: GlobalPair, Action: %s", m_Typenames[(int)(t)]);
42  PrintLn();
43  PrintS("Left : "); p_Write(a, GetBasering());
44  PrintS("Right: "); p_Write(b, GetBasering());
45  if( t == MULT_STORE )
46  {
47    PrintS("Result: "); p_Write(p, GetBasering());
48  }
49#endif
50}
51
52
53void  CSpecialPairCacheHash::History(const EHistoryType t, const CSpecialPairCacheHash::CExponent a, const CSpecialPairCacheHash::CExponent b, const poly p)
54{
55#if OUTPUT
56  Print("History: SpecialPair, Action: %s", m_Typenames[(int)(t)]);
57  PrintLn();
58  Print("Left : %d, Right: %d", a, b);
59  PrintLn();
60  if( t == MULT_STORE )
61  {
62    PrintS("Result: "); p_Write(p, GetBasering());
63  }
64#endif
65}
Note: See TracBrowser for help on using the repository browser.