mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Update clang-format to version 18
clang-format-18 is available in ubuntu noble(24.04), if you are on a version lower than that you can use the update script from llvm. https://apt.llvm.org/ Windows users should be able to download and use clang-format from their release builds https://github.com/llvm/llvm-project/releases or get the latest from msys2 https://packages.msys2.org/package/mingw-w64-x86_64-clang. macOS users can resort to "brew install clang-format". closes https://github.com/official-stockfish/Stockfish/pull/5365 No functional change
This commit is contained in:
parent
36eb9bc783
commit
fb18caae7a
6 changed files with 13 additions and 14 deletions
6
.github/workflows/clang-format.yml
vendored
6
.github/workflows/clang-format.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
id: clang-format
|
id: clang-format
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
clang-format-version: "17"
|
clang-format-version: "18"
|
||||||
exclude-regex: "incbin"
|
exclude-regex: "incbin"
|
||||||
|
|
||||||
- name: Comment on PR
|
- name: Comment on PR
|
||||||
|
@ -33,9 +33,9 @@ jobs:
|
||||||
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # @v2.5.0
|
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # @v2.5.0
|
||||||
with:
|
with:
|
||||||
message: |
|
message: |
|
||||||
clang-format 17 needs to be run on this PR.
|
clang-format 18 needs to be run on this PR.
|
||||||
If you do not have clang-format installed, the maintainer will run it when merging.
|
If you do not have clang-format installed, the maintainer will run it when merging.
|
||||||
For the exact version please see https://packages.ubuntu.com/mantic/clang-format-17.
|
For the exact version please see https://packages.ubuntu.com/noble/clang-format-18.
|
||||||
|
|
||||||
_(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_
|
_(execution **${{ github.run_id }}** / attempt **${{ github.run_attempt }}**)_
|
||||||
comment_tag: execution
|
comment_tag: execution
|
||||||
|
|
|
@ -59,7 +59,7 @@ discussion._
|
||||||
|
|
||||||
Changes to Stockfish C++ code should respect our coding style defined by
|
Changes to Stockfish C++ code should respect our coding style defined by
|
||||||
[.clang-format](.clang-format). You can format your changes by running
|
[.clang-format](.clang-format). You can format your changes by running
|
||||||
`make format`. This requires clang-format version 17 to be installed on your system.
|
`make format`. This requires clang-format version 18 to be installed on your system.
|
||||||
|
|
||||||
## Navigate
|
## Navigate
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,8 @@ dotprod = no
|
||||||
arm_version = 0
|
arm_version = 0
|
||||||
STRIP = strip
|
STRIP = strip
|
||||||
|
|
||||||
ifneq ($(shell which clang-format-17 2> /dev/null),)
|
ifneq ($(shell which clang-format-18 2> /dev/null),)
|
||||||
CLANG-FORMAT = clang-format-17
|
CLANG-FORMAT = clang-format-18
|
||||||
else
|
else
|
||||||
CLANG-FORMAT = clang-format
|
CLANG-FORMAT = clang-format
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -579,9 +579,10 @@ Value Search::Worker::search(
|
||||||
// Step 2. Check for aborted search and immediate draw
|
// Step 2. Check for aborted search and immediate draw
|
||||||
if (threads.stop.load(std::memory_order_relaxed) || pos.is_draw(ss->ply)
|
if (threads.stop.load(std::memory_order_relaxed) || pos.is_draw(ss->ply)
|
||||||
|| ss->ply >= MAX_PLY)
|
|| ss->ply >= MAX_PLY)
|
||||||
return (ss->ply >= MAX_PLY && !ss->inCheck) ? evaluate(
|
return (ss->ply >= MAX_PLY && !ss->inCheck)
|
||||||
networks[numaAccessToken], pos, refreshTable, thisThread->optimism[us])
|
? evaluate(networks[numaAccessToken], pos, refreshTable,
|
||||||
: value_draw(thisThread->nodes);
|
thisThread->optimism[us])
|
||||||
|
: value_draw(thisThread->nodes);
|
||||||
|
|
||||||
// Step 3. Mate distance pruning. Even if we mate at the next move our score
|
// Step 3. Mate distance pruning. Even if we mate at the next move our score
|
||||||
// would be at best mate_in(ss->ply + 1), but if alpha is already bigger because
|
// would be at best mate_in(ss->ply + 1), but if alpha is already bigger because
|
||||||
|
@ -775,8 +776,7 @@ Value Search::Worker::search(
|
||||||
|
|
||||||
// Step 8. Futility pruning: child node (~40 Elo)
|
// Step 8. Futility pruning: child node (~40 Elo)
|
||||||
// The depth condition is important for mate finding.
|
// The depth condition is important for mate finding.
|
||||||
if (!ss->ttPv && depth < 13
|
if (!ss->ttPv && depth < 13 && eval - futilityMargin - (ss - 1)->statScore / 263 >= beta
|
||||||
&& eval - futilityMargin - (ss - 1)->statScore / 263 >= beta
|
|
||||||
&& eval >= beta && eval < VALUE_TB_WIN_IN_MAX_PLY && (!ttMove || ttCapture))
|
&& eval >= beta && eval < VALUE_TB_WIN_IN_MAX_PLY && (!ttMove || ttCapture))
|
||||||
return beta > VALUE_TB_LOSS_IN_MAX_PLY ? beta + (eval - beta) / 3 : eval;
|
return beta > VALUE_TB_LOSS_IN_MAX_PLY ? beta + (eval - beta) / 3 : eval;
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ void ThreadPool::set(const NumaConfig& numaConfig,
|
||||||
const size_t threadId = threads.size();
|
const size_t threadId = threads.size();
|
||||||
const NumaIndex numaId = doBindThreads ? boundThreadToNumaNode[threadId] : 0;
|
const NumaIndex numaId = doBindThreads ? boundThreadToNumaNode[threadId] : 0;
|
||||||
auto manager = threadId == 0 ? std::unique_ptr<Search::ISearchManager>(
|
auto manager = threadId == 0 ? std::unique_ptr<Search::ISearchManager>(
|
||||||
std::make_unique<Search::SearchManager>(updateContext))
|
std::make_unique<Search::SearchManager>(updateContext))
|
||||||
: std::make_unique<Search::NullSearchManager>();
|
: std::make_unique<Search::NullSearchManager>();
|
||||||
|
|
||||||
// When not binding threads we want to force all access to happen
|
// When not binding threads we want to force all access to happen
|
||||||
|
|
|
@ -118,7 +118,6 @@ void Tune::Entry<Tune::PostUpdate>::read_option() {
|
||||||
|
|
||||||
namespace Stockfish {
|
namespace Stockfish {
|
||||||
|
|
||||||
void Tune::read_results() { /* ...insert your values here... */
|
void Tune::read_results() { /* ...insert your values here... */ }
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Stockfish
|
} // namespace Stockfish
|
||||||
|
|
Loading…
Add table
Reference in a new issue