]> git.sesse.net Git - stockfish/blobdiff - src/tt.h
Assorted code style and comments in pawns.cpp and pawns.h
[stockfish] / src / tt.h
index c37b9d3ff6f74c96bbfe3853d8747f0f72804933..fe4cee62ae39a83ec94ad3d232289daa94a7d395 100644 (file)
--- a/src/tt.h
+++ b/src/tt.h
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-
 #if !defined(TT_H_INCLUDED)
 #define TT_H_INCLUDED
 
 #include <iostream>
 
-#include "depth.h"
 #include "move.h"
-#include "value.h"
-
-
-////
-//// Types
-////
-
+#include "types.h"
 
 /// A simple fixed size hash table used to store pawns and material
 /// configurations. It is basically just an array of Entry objects.
@@ -56,9 +48,10 @@ public:
     memset(entries, 0, HashSize * sizeof(Entry));
   }
 
-  ~SimpleHash() { delete [] entries; }
+  virtual ~SimpleHash() { delete [] entries; }
 
   Entry* find(Key key) const { return entries + ((uint32_t)key & (HashSize - 1)); }
+  void prefetch(Key key) const { ::prefetch((char*)find(key)); }
 
 protected:
   Entry* entries;