mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Cleanup includes
Reorder a few includes, include "position.h" where it was previously missing and apply include-what-you-use suggestions. Also make the order of the includes consistent, in the following way: 1. Related header (for .cpp files) 2. A blank line 3. C/C++ headers 4. A blank line 5. All other header files closes https://github.com/official-stockfish/Stockfish/pull/4763 fixes https://github.com/official-stockfish/Stockfish/issues/4707 No functional change
This commit is contained in:
parent
8cd5cbf693
commit
3c0e86a91e
42 changed files with 226 additions and 96 deletions
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
#include "benchmark.h"
|
#include "benchmark.h"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <istream>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
|
|
|
@ -16,10 +16,12 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "bitboard.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
|
#include <initializer_list>
|
||||||
|
|
||||||
#include "bitboard.h"
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
|
@ -19,6 +19,11 @@
|
||||||
#ifndef BITBOARD_H_INCLUDED
|
#ifndef BITBOARD_H_INCLUDED
|
||||||
#define BITBOARD_H_INCLUDED
|
#define BITBOARD_H_INCLUDED
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstdlib>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
|
@ -16,23 +16,24 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "evaluate.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cstdlib>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <sstream>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <streambuf>
|
#include <sstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "bitboard.h"
|
|
||||||
#include "evaluate.h"
|
|
||||||
#include "misc.h"
|
|
||||||
#include "thread.h"
|
|
||||||
#include "timeman.h"
|
|
||||||
#include "uci.h"
|
|
||||||
#include "incbin/incbin.h"
|
#include "incbin/incbin.h"
|
||||||
|
#include "misc.h"
|
||||||
#include "nnue/evaluate_nnue.h"
|
#include "nnue/evaluate_nnue.h"
|
||||||
|
#include "position.h"
|
||||||
|
#include "thread.h"
|
||||||
|
#include "types.h"
|
||||||
|
#include "uci.h"
|
||||||
|
|
||||||
// Macro to embed the default efficiently updatable neural network (NNUE) file
|
// Macro to embed the default efficiently updatable neural network (NNUE) file
|
||||||
// data in the engine binary (using incbin.h, by Dale Weiler).
|
// data in the engine binary (using incbin.h, by Dale Weiler).
|
||||||
|
|
|
@ -20,13 +20,11 @@
|
||||||
#define EVALUATE_H_INCLUDED
|
#define EVALUATE_H_INCLUDED
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <optional>
|
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
class Position;
|
class Position;
|
||||||
|
enum Value : int;
|
||||||
|
|
||||||
namespace Eval {
|
namespace Eval {
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,17 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "bitboard.h"
|
#include "bitboard.h"
|
||||||
|
#include "evaluate.h"
|
||||||
|
#include "misc.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "syzygy/tbprobe.h"
|
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "tt.h"
|
#include "tune.h"
|
||||||
|
#include "types.h"
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
|
|
||||||
using namespace Stockfish;
|
using namespace Stockfish;
|
||||||
|
|
11
src/misc.cpp
11
src/misc.cpp
|
@ -16,6 +16,8 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#if _WIN32_WINNT < 0x0601
|
#if _WIN32_WINNT < 0x0601
|
||||||
#undef _WIN32_WINNT
|
#undef _WIN32_WINNT
|
||||||
|
@ -44,17 +46,19 @@ using fun8_t = bool(*)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <mutex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <vector>
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(__ANDROID__)
|
#if defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,9 +67,6 @@ using fun8_t = bool(*)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "misc.h"
|
|
||||||
#include "thread.h"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
|
@ -21,12 +21,10 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <ostream>
|
#include <cstddef>
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <iosfwd>
|
||||||
#include "types.h"
|
#include <string>
|
||||||
|
|
||||||
#define stringify2(x) #x
|
#define stringify2(x) #x
|
||||||
#define stringify(x) stringify2(x)
|
#define stringify(x) stringify2(x)
|
||||||
|
|
|
@ -16,9 +16,12 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
|
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <initializer_list>
|
||||||
|
|
||||||
|
#include "bitboard.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define MOVEGEN_H_INCLUDED
|
#define MOVEGEN_H_INCLUDED
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,15 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "movepick.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <iterator>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "bitboard.h"
|
#include "bitboard.h"
|
||||||
#include "movepick.h"
|
#include "position.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,17 @@
|
||||||
#define MOVEPICK_H_INCLUDED
|
#define MOVEPICK_H_INCLUDED
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstdlib>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
#include "position.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
class Position;
|
||||||
|
|
||||||
/// StatsEntry stores the stat table value. It is usually a number but could
|
/// StatsEntry stores the stat table value. It is usually a number but could
|
||||||
/// be a move or even a nested history. We use a class instead of naked value
|
/// be a move or even a nested history. We use a class instead of naked value
|
||||||
|
|
|
@ -18,19 +18,24 @@
|
||||||
|
|
||||||
// Code for calculating NNUE evaluation function
|
// Code for calculating NNUE evaluation function
|
||||||
|
|
||||||
|
#include "evaluate_nnue.h"
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <set>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include "../evaluate.h"
|
#include "../evaluate.h"
|
||||||
|
#include "../misc.h"
|
||||||
#include "../position.h"
|
#include "../position.h"
|
||||||
#include "../uci.h"
|
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
|
#include "../uci.h"
|
||||||
#include "evaluate_nnue.h"
|
#include "nnue_accumulator.h"
|
||||||
|
#include "nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE {
|
namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
|
|
|
@ -21,9 +21,20 @@
|
||||||
#ifndef NNUE_EVALUATE_NNUE_H_INCLUDED
|
#ifndef NNUE_EVALUATE_NNUE_H_INCLUDED
|
||||||
#define NNUE_EVALUATE_NNUE_H_INCLUDED
|
#define NNUE_EVALUATE_NNUE_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <iosfwd>
|
||||||
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "../misc.h"
|
||||||
|
#include "nnue_architecture.h"
|
||||||
#include "nnue_feature_transformer.h"
|
#include "nnue_feature_transformer.h"
|
||||||
|
|
||||||
#include <memory>
|
namespace Stockfish {
|
||||||
|
class Position;
|
||||||
|
enum Value : int;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE {
|
namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,10 @@
|
||||||
|
|
||||||
#include "half_ka_v2_hm.h"
|
#include "half_ka_v2_hm.h"
|
||||||
|
|
||||||
|
#include "../../bitboard.h"
|
||||||
#include "../../position.h"
|
#include "../../position.h"
|
||||||
|
#include "../../types.h"
|
||||||
|
#include "../nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE::Features {
|
namespace Stockfish::Eval::NNUE::Features {
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,15 @@
|
||||||
#ifndef NNUE_FEATURES_HALF_KA_V2_HM_H_INCLUDED
|
#ifndef NNUE_FEATURES_HALF_KA_V2_HM_H_INCLUDED
|
||||||
#define NNUE_FEATURES_HALF_KA_V2_HM_H_INCLUDED
|
#define NNUE_FEATURES_HALF_KA_V2_HM_H_INCLUDED
|
||||||
|
|
||||||
#include "../nnue_common.h"
|
#include <cstdint>
|
||||||
|
|
||||||
#include "../../evaluate.h"
|
|
||||||
#include "../../misc.h"
|
#include "../../misc.h"
|
||||||
|
#include "../../types.h"
|
||||||
|
#include "../nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
struct StateInfo;
|
struct StateInfo;
|
||||||
|
class Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE::Features {
|
namespace Stockfish::Eval::NNUE::Features {
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
#ifndef NNUE_LAYERS_AFFINE_TRANSFORM_H_INCLUDED
|
#ifndef NNUE_LAYERS_AFFINE_TRANSFORM_H_INCLUDED
|
||||||
#define NNUE_LAYERS_AFFINE_TRANSFORM_H_INCLUDED
|
#define NNUE_LAYERS_AFFINE_TRANSFORM_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
|
||||||
#include <type_traits>
|
|
||||||
#include "../nnue_common.h"
|
#include "../nnue_common.h"
|
||||||
#include "simd.h"
|
#include "simd.h"
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,12 @@
|
||||||
#ifndef NNUE_LAYERS_AFFINE_TRANSFORM_SPARSE_INPUT_H_INCLUDED
|
#ifndef NNUE_LAYERS_AFFINE_TRANSFORM_SPARSE_INPUT_H_INCLUDED
|
||||||
#define NNUE_LAYERS_AFFINE_TRANSFORM_SPARSE_INPUT_H_INCLUDED
|
#define NNUE_LAYERS_AFFINE_TRANSFORM_SPARSE_INPUT_H_INCLUDED
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <type_traits>
|
#include <cstdint>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "../../bitboard.h"
|
||||||
#include "../nnue_common.h"
|
#include "../nnue_common.h"
|
||||||
#include "affine_transform.h"
|
#include "affine_transform.h"
|
||||||
#include "simd.h"
|
#include "simd.h"
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
#ifndef NNUE_LAYERS_CLIPPED_RELU_H_INCLUDED
|
#ifndef NNUE_LAYERS_CLIPPED_RELU_H_INCLUDED
|
||||||
#define NNUE_LAYERS_CLIPPED_RELU_H_INCLUDED
|
#define NNUE_LAYERS_CLIPPED_RELU_H_INCLUDED
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <iosfwd>
|
||||||
|
|
||||||
#include "../nnue_common.h"
|
#include "../nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE::Layers {
|
namespace Stockfish::Eval::NNUE::Layers {
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
#ifndef NNUE_LAYERS_SQR_CLIPPED_RELU_H_INCLUDED
|
#ifndef NNUE_LAYERS_SQR_CLIPPED_RELU_H_INCLUDED
|
||||||
#define NNUE_LAYERS_SQR_CLIPPED_RELU_H_INCLUDED
|
#define NNUE_LAYERS_SQR_CLIPPED_RELU_H_INCLUDED
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <iosfwd>
|
||||||
|
|
||||||
#include "../nnue_common.h"
|
#include "../nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE::Layers {
|
namespace Stockfish::Eval::NNUE::Layers {
|
||||||
|
|
|
@ -21,7 +21,10 @@
|
||||||
#ifndef NNUE_ACCUMULATOR_H_INCLUDED
|
#ifndef NNUE_ACCUMULATOR_H_INCLUDED
|
||||||
#define NNUE_ACCUMULATOR_H_INCLUDED
|
#define NNUE_ACCUMULATOR_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "nnue_architecture.h"
|
#include "nnue_architecture.h"
|
||||||
|
#include "nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE {
|
namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
|
|
|
@ -21,18 +21,16 @@
|
||||||
#ifndef NNUE_ARCHITECTURE_H_INCLUDED
|
#ifndef NNUE_ARCHITECTURE_H_INCLUDED
|
||||||
#define NNUE_ARCHITECTURE_H_INCLUDED
|
#define NNUE_ARCHITECTURE_H_INCLUDED
|
||||||
|
|
||||||
#include <memory>
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
#include "nnue_common.h"
|
#include <iosfwd>
|
||||||
|
|
||||||
#include "features/half_ka_v2_hm.h"
|
#include "features/half_ka_v2_hm.h"
|
||||||
|
|
||||||
#include "layers/affine_transform_sparse_input.h"
|
|
||||||
#include "layers/affine_transform.h"
|
#include "layers/affine_transform.h"
|
||||||
|
#include "layers/affine_transform_sparse_input.h"
|
||||||
#include "layers/clipped_relu.h"
|
#include "layers/clipped_relu.h"
|
||||||
#include "layers/sqr_clipped_relu.h"
|
#include "layers/sqr_clipped_relu.h"
|
||||||
|
#include "nnue_common.h"
|
||||||
#include "../misc.h"
|
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE {
|
namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,14 @@
|
||||||
#ifndef NNUE_COMMON_H_INCLUDED
|
#ifndef NNUE_COMMON_H_INCLUDED
|
||||||
#define NNUE_COMMON_H_INCLUDED
|
#define NNUE_COMMON_H_INCLUDED
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
#include "../misc.h" // for IsLittleEndian
|
#include "../misc.h"
|
||||||
|
|
||||||
#if defined(USE_AVX2)
|
#if defined(USE_AVX2)
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
|
|
|
@ -21,11 +21,18 @@
|
||||||
#ifndef NNUE_FEATURE_TRANSFORMER_H_INCLUDED
|
#ifndef NNUE_FEATURE_TRANSFORMER_H_INCLUDED
|
||||||
#define NNUE_FEATURE_TRANSFORMER_H_INCLUDED
|
#define NNUE_FEATURE_TRANSFORMER_H_INCLUDED
|
||||||
|
|
||||||
#include "nnue_common.h"
|
#include <algorithm>
|
||||||
#include "nnue_architecture.h"
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstring>
|
||||||
|
#include <iosfwd>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include <cstring> // std::memset()
|
#include "../position.h"
|
||||||
#include <utility> // std::pair
|
#include "../types.h"
|
||||||
|
#include "nnue_accumulator.h"
|
||||||
|
#include "nnue_architecture.h"
|
||||||
|
#include "nnue_common.h"
|
||||||
|
|
||||||
namespace Stockfish::Eval::NNUE {
|
namespace Stockfish::Eval::NNUE {
|
||||||
|
|
||||||
|
|
|
@ -16,22 +16,29 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "position.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef> // For offsetof()
|
#include <cctype>
|
||||||
#include <cstring> // For std::memset, std::memcmp
|
#include <cstddef>
|
||||||
|
#include <cstring>
|
||||||
|
#include <initializer_list>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "bitboard.h"
|
#include "bitboard.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
#include "position.h"
|
#include "nnue/nnue_common.h"
|
||||||
|
#include "syzygy/tbprobe.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
#include "syzygy/tbprobe.h"
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,13 @@
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <memory> // For std::unique_ptr
|
#include <iosfwd>
|
||||||
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "bitboard.h"
|
#include "bitboard.h"
|
||||||
#include "evaluate.h"
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
#include "nnue/nnue_accumulator.h"
|
#include "nnue/nnue_accumulator.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -16,25 +16,34 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "search.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
|
#include <atomic>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring> // For std::memset
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <initializer_list>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
#include "bitboard.h"
|
||||||
#include "evaluate.h"
|
#include "evaluate.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
#include "movepick.h"
|
#include "movepick.h"
|
||||||
|
#include "nnue/evaluate_nnue.h"
|
||||||
|
#include "nnue/nnue_common.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
#include "search.h"
|
#include "syzygy/tbprobe.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "timeman.h"
|
#include "timeman.h"
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
#include "syzygy/tbprobe.h"
|
|
||||||
#include "nnue/evaluate_nnue.h"
|
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#ifndef SEARCH_H_INCLUDED
|
#ifndef SEARCH_H_INCLUDED
|
||||||
#define SEARCH_H_INCLUDED
|
#define SEARCH_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
|
@ -16,33 +16,38 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "tbprobe.h"
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <cassert>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring> // For std::memset and std::memcpy
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <initializer_list>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <list>
|
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "../bitboard.h"
|
#include "../bitboard.h"
|
||||||
|
#include "../misc.h"
|
||||||
#include "../movegen.h"
|
#include "../movegen.h"
|
||||||
#include "../position.h"
|
#include "../position.h"
|
||||||
#include "../search.h"
|
#include "../search.h"
|
||||||
#include "../types.h"
|
#include "../types.h"
|
||||||
#include "../uci.h"
|
#include "../uci.h"
|
||||||
|
|
||||||
#include "tbprobe.h"
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/stat.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
|
|
|
@ -19,8 +19,14 @@
|
||||||
#ifndef TBPROBE_H
|
#ifndef TBPROBE_H
|
||||||
#define TBPROBE_H
|
#define TBPROBE_H
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "../search.h"
|
#include "../search.h"
|
||||||
|
|
||||||
|
namespace Stockfish {
|
||||||
|
class Position;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Stockfish::Tablebases {
|
namespace Stockfish::Tablebases {
|
||||||
|
|
||||||
enum WDLScore {
|
enum WDLScore {
|
||||||
|
|
|
@ -16,15 +16,23 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cassert>
|
#include "thread.h"
|
||||||
|
|
||||||
#include <algorithm> // For std::count
|
#include <algorithm>
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <deque>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
|
#include "misc.h"
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "thread.h"
|
|
||||||
#include "uci.h"
|
|
||||||
#include "syzygy/tbprobe.h"
|
#include "syzygy/tbprobe.h"
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
|
#include "uci.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,16 @@
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <thread>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "movepick.h"
|
#include "movepick.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "thread_win32_osx.h"
|
#include "thread_win32_osx.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "timeman.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cfloat>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "timeman.h"
|
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
|
@ -19,9 +19,12 @@
|
||||||
#ifndef TIMEMAN_H_INCLUDED
|
#ifndef TIMEMAN_H_INCLUDED
|
||||||
#define TIMEMAN_H_INCLUDED
|
#define TIMEMAN_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,17 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstring> // For std::memset
|
#include "tt.h"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "bitboard.h"
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "tt.h"
|
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
3
src/tt.h
3
src/tt.h
|
@ -19,6 +19,9 @@
|
||||||
#ifndef TT_H_INCLUDED
|
#ifndef TT_H_INCLUDED
|
||||||
#define TT_H_INCLUDED
|
#define TT_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
|
11
src/tune.cpp
11
src/tune.cpp
|
@ -16,14 +16,20 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "tune.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <map>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
#include "misc.h"
|
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
|
|
||||||
|
namespace Stockfish {
|
||||||
|
enum Value : int;
|
||||||
|
}
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
@ -108,7 +114,6 @@ template<> void Tune::Entry<Tune::PostUpdate>::read_option() { value(); }
|
||||||
//
|
//
|
||||||
// Then paste the output below, as the function body
|
// Then paste the output below, as the function body
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,15 @@
|
||||||
#ifndef TUNE_H_INCLUDED
|
#ifndef TUNE_H_INCLUDED
|
||||||
#define TUNE_H_INCLUDED
|
#define TUNE_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
enum Value : int;
|
||||||
|
|
||||||
using Range = std::pair<int, int>; // Option's min-max values
|
using Range = std::pair<int, int>; // Option's min-max values
|
||||||
using RangeFun = Range (int);
|
using RangeFun = Range (int);
|
||||||
|
|
|
@ -37,10 +37,7 @@
|
||||||
/// | only in 64-bit mode and requires hardware with pext support.
|
/// | only in 64-bit mode and requires hardware with pext support.
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cctype>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
// Disable some silly and noisy warning from MSVC compiler
|
// Disable some silly and noisy warning from MSVC compiler
|
||||||
|
|
17
src/uci.cpp
17
src/uci.cpp
|
@ -16,23 +16,30 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "uci.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cctype>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <deque>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
#include <optional>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "benchmark.h"
|
#include "benchmark.h"
|
||||||
#include "evaluate.h"
|
#include "evaluate.h"
|
||||||
|
#include "misc.h"
|
||||||
#include "movegen.h"
|
#include "movegen.h"
|
||||||
|
#include "nnue/evaluate_nnue.h"
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "timeman.h"
|
|
||||||
#include "tt.h"
|
|
||||||
#include "uci.h"
|
|
||||||
#include "syzygy/tbprobe.h"
|
|
||||||
#include "nnue/evaluate_nnue.h"
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#ifndef UCI_H_INCLUDED
|
#ifndef UCI_H_INCLUDED
|
||||||
#define UCI_H_INCLUDED
|
#define UCI_H_INCLUDED
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include <iosfwd>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,23 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
#include <cctype>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <iosfwd>
|
||||||
|
#include <istream>
|
||||||
|
#include <map>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "evaluate.h"
|
#include "evaluate.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "search.h"
|
#include "search.h"
|
||||||
|
#include "syzygy/tbprobe.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "tt.h"
|
#include "tt.h"
|
||||||
|
#include "types.h"
|
||||||
#include "uci.h"
|
#include "uci.h"
|
||||||
#include "syzygy/tbprobe.h"
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue