BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
ben_bot::PawnTable Class Referencefinal

#include <libbenbot/data-structures/PawnTable.hpp>

Public Member Functions

void clear () noexcept
auto probe (const std::uint64_t key) noexcept -> PawnEntry &

Static Public Attributes

static constexpr auto NumEntries { std::size_t { 1 } << 14uz }

Detailed Description

A fixed-size cache of pawn structure evaluations, indexed by the position's pawn hash. New entries always replace old ones. Each search thread owns its own table, so no locking is needed.

Definition at line 54 of file PawnTable.hpp.

Member Function Documentation

◆ clear()

void ben_bot::PawnTable::clear ( )
inlinenoexcept

Clears all entries in the table.

Definition at line 70 of file PawnTable.hpp.

◆ probe()

auto ben_bot::PawnTable::probe ( const std::uint64_t key) -> PawnEntry &
inlinenodiscardnoexcept

Returns the entry slot for the given pawn hash. The caller must check the entry's key to see if it's a hit.

Definition at line 64 of file PawnTable.hpp.

Member Data Documentation

◆ NumEntries

auto ben_bot::PawnTable::NumEntries { std::size_t { 1 } << 14uz }
staticconstexpr

The number of entries in the table. This must be a power of 2.

Definition at line 57 of file PawnTable.hpp.


The documentation for this class was generated from the following file: