-
-
-/// Constructors
-
-TTEntry::TTEntry() {
-}
-
-TTEntry::TTEntry(Key k, Value v, ValueType t, Depth d, Move m,
- int generation) {
- key_ = k;
- data = (m & 0x7FFFF) | (t << 20) | (generation << 23);
- value_ = v;
- depth_ = int16_t(d);
-}
-
-
-/// Functions for extracting data from TTEntry objects.
-
-Key TTEntry::key() const {
- return key_;
-}
-
-Depth TTEntry::depth() const {
- return Depth(depth_);
-}
-
-Move TTEntry::move() const {
- return Move(data & 0x7FFFF);
-}
-
-Value TTEntry::value() const {
- return Value(value_);
-}
-
-ValueType TTEntry::type() const {
- return ValueType((data >> 20) & 3);
-}
-
-int TTEntry::generation() const {
- return (data >> 23);
-}