source: git/kernel/ncSACache.cc @ baa72c5

spielwiese
Last change on this file since baa72c5 was 03cecc2, checked in by Motsak Oleksandr <motsak@…>, 16 years ago
*motsak: done: main special casescvs update! git-svn-id: file:///usr/local/Singular/svn/trunk@10895 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: ncSACache.cc,v 1.4 2008-07-21 00:05:09 motsak Exp $
10 *******************************************************************/
11
12
13#include "mod2.h"
14
15#ifndef NDEBUG
16
17#define MYTEST 1
18#define OUTPUT 1
19
20#if MYTEST
21#define OM_CHECK 4
22#define OM_TRACK 5
23#endif
24
25#else
26
27#define MYTEST 0
28#define OUTPUT 0
29
30#endif
31
32
33#include <ncSACache.h> // for CCacheHash etc classes
34
35#include <ring.h>
36#include <p_polys.h>
37
38static const char* m_Typenames[2] = {"lookup", "store"};
39
40void CGlobalCacheHash::History(const EHistoryType t, const CGlobalCacheHash::CExponent a, const CGlobalCacheHash::CExponent b, const poly p)
41{
42#if OUTPUT
43  Print("History: GlobalPair, Action: %s", m_Typenames[(int)(t)]);
44  PrintLn();
45  PrintS("Left : "); p_Write(a, GetBasering());
46  PrintS("Right: "); p_Write(b, GetBasering());
47  if( t == MULT_STORE )
48  {
49    PrintS("Result: "); p_Write(p, GetBasering());
50  }
51#endif
52}
53
54
55void  CSpecialPairCacheHash::History(const EHistoryType t, const CSpecialPairCacheHash::CExponent a, const CSpecialPairCacheHash::CExponent b, const poly p)
56{
57#if OUTPUT
58  Print("History: SpecialPair, Action: %s", m_Typenames[(int)(t)]);
59  PrintLn();
60  Print("Left : %d, Right: %d", a, b);
61  PrintLn();
62  if( t == MULT_STORE )
63  {
64    PrintS("Result: "); p_Write(p, GetBasering());
65  }
66#endif
67}
Note: See TracBrowser for help on using the repository browser.