g++ -O3 -march=native -std=c++17 bench.cpp bitboard.cpp defaults.cpp eval.cpp history.cpp moves.cpp ordering.cpp search.cpp see.cpp timeman.cpp transposition.cpp uci.cpp -o Weak-A861808C
history.cpp:19:9: error: conflicting declaration 'int32_t pawn_correction_history [16384]'
19 | int32_t pawn_correction_history[16384]{};
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from history.cpp:4:
history.hpp:25:16: note: previous declaration as 'int32_t pawn_correction_history [2][16384]'
25 | extern int32_t pawn_correction_history[2][16384];
| ^~~~~~~~~~~~~~~~~~~~~~~
history.cpp: In function 'void reset_correction_history()':
history.cpp:60:43: error: incompatible types in assignment of 'int' to 'int32_t [16384]' {aka 'int [16384]'}
60 | pawn_correction_history[hash_key] = 0;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
history.cpp: In function 'void update_correction_history(const chess::Board&, int32_t, int32_t)':
history.cpp:91:84: error: invalid operands of types 'int32_t [16384]' {aka 'int [16384]'} and 'int' to binary 'operator*'
91 | pawn_correction_history[pawn_key_idx] = (pawn_correction_history[pawn_key_idx] * (256 - new_weight) + scaled_diff * new_weight) / 256;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
| | |
| | int
| int32_t [16384] {aka int [16384]}
history.cpp:96:50: error: no matching function for call to 'clamp(int32_t [16384], int, int)'
96 | pawn_correction_history[pawn_key_idx] = clamp(pawn_correction_history[pawn_key_idx], -16384, 16384);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/include/c++/14.2.0/algorithm:61,
from chess.hpp:48,
from history.cpp:2:
C:/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/include/c++/14.2.0/bits/stl_algo.h:3623:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&)'
3623 | clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi)
| ^~~~~
C:/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/include/c++/14.2.0/bits/stl_algo.h:3623:5: note: template argument deduction/substitution failed:
history.cpp:96:50: note: deduced conflicting types for parameter 'const _Tp' ('int [16384]' and 'int')
96 | pawn_correction_history[pawn_key_idx] = clamp(pawn_correction_history[pawn_key_idx], -16384, 16384);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/include/c++/14.2.0/bits/stl_algo.h:3643:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::clamp(const _Tp&, const _Tp&, const _Tp&, _Compare)'
3643 | clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
| ^~~~~
C:/winlibs-x86_64-posix-seh-gcc-14.2.0-llvm-19.1.7-mingw-w64ucrt-12.0.0-r3/mingw64/include/c++/14.2.0/bits/stl_algo.h:3643:5: note: candidate expects 4 arguments, 3 provided
history.cpp: In function 'int32_t corrhist_adjust_eval(const chess::Board&, int32_t)':
history.cpp:115:160: error: invalid conversion from 'int32_t*' {aka 'int*'} to 'int32_t' {aka 'int'} [-fpermissive]
115 | int32_t entry = pawn_correction_history[pawn_key_idx] + non_pawn_correction_history[stm][non_pawn_key_idx] + minor_correction_history[stm][minors_key_idx] + major_correction_history[stm][majors_key_idx];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int32_t* {aka int*}
make: *** [all] Error 1