]> git.sesse.net Git - stockfish/blobdiff - src/tt.h
Some renaming in split()
[stockfish] / src / tt.h
index 2cc1a3c5d3bfa8a394045e9df9db5d6b854b0bff..f3b0f2adcb327e9c096c9735a65dad8795995e3b 100644 (file)
--- a/src/tt.h
+++ b/src/tt.h
 #if !defined(TT_H_INCLUDED)
 #define TT_H_INCLUDED
 
-#include <iostream>
-
 #include "misc.h"
 #include "types.h"
 
-
 /// The TTEntry is the class of transposition table entries
 ///
 /// A TTEntry needs 128 bits to be stored
@@ -100,7 +97,7 @@ class TranspositionTable {
 
 public:
   TranspositionTable();
 ~TranspositionTable();
+ ~TranspositionTable();
   void set_size(size_t mbSize);
   void clear();
   void store(const Key posKey, Value v, Bound type, Depth d, Move m, Value statV, Value kingD);
@@ -136,35 +133,4 @@ inline void TranspositionTable::refresh(const TTEntry* tte) const {
   const_cast<TTEntry*>(tte)->set_generation(generation);
 }
 
-
-/// A simple fixed size hash table used to store pawns and material
-/// configurations. It is basically just an array of Entry objects.
-/// Without cluster concept or overwrite policy.
-
-template<class Entry, int HashSize>
-struct SimpleHash {
-
-  typedef SimpleHash<Entry, HashSize> Base;
-
-  SimpleHash() {
-
-    entries = new (std::nothrow) Entry[HashSize];
-    if (!entries)
-    {
-        std::cerr << "Failed to allocate " << HashSize * sizeof(Entry)
-                  << " bytes for hash table." << std::endl;
-        exit(EXIT_FAILURE);
-    }
-    memset(entries, 0, HashSize * sizeof(Entry));
-  }
-
-  virtual ~SimpleHash() { delete [] entries; }
-
-  Entry* probe(Key key) const { return entries + ((uint32_t)key & (HashSize - 1)); }
-  void prefetch(Key key) const { ::prefetch((char*)probe(key)); }
-
-protected:
-  Entry* entries;
-};
-
 #endif // !defined(TT_H_INCLUDED)