Rev 154 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 154 | Rev 169 | ||
|---|---|---|---|
| Line 4... | Line 4... | ||
| 4 | Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad |
4 | Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad |
| 5 | Copyright (C) 2015- |
5 | Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad |
| 6 | 6 | ||
| 7 | Stockfish is free software: you can redistribute it and/or modify |
7 | Stockfish is free software: you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation, either version 3 of the License, or |
9 | the Free Software Foundation, either version 3 of the License, or |
| 10 | (at your option) any later version. |
10 | (at your option) any later version. |
| Line 102... | Line 102... | ||
| 102 | TTEntry* probe(const Key key, bool& found) const; |
102 | TTEntry* probe(const Key key, bool& found) const; |
| 103 | int hashfull() const; |
103 | int hashfull() const; |
| 104 | void resize(size_t mbSize); |
104 | void resize(size_t mbSize); |
| 105 | void clear(); |
105 | void clear(); |
| 106 | 106 | ||
| 107 | // The lowest order bits of the key are used to get the index of the cluster |
107 | // The 32 lowest order bits of the key are used to get the index of the cluster |
| 108 | TTEntry* first_entry(const Key key) const { |
108 | TTEntry* first_entry(const Key key) const { |
| 109 | return &table[( |
109 | return &table[(uint32_t(key) * uint64_t(clusterCount)) >> 32].entry[0]; |
| 110 | } |
110 | } |
| 111 | 111 | ||
| 112 | private: |
112 | private: |
| 113 | size_t clusterCount; |
113 | size_t clusterCount; |
| 114 | Cluster* table; |
114 | Cluster* table; |