mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-27 04:26:24 +08:00
Make casting styles consistent
Make casting styles consistent with the rest of the code. closes https://github.com/official-stockfish/Stockfish/pull/4793 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
952740b36c
commit
fce4cc1829
@@ -139,7 +139,7 @@ namespace Stockfish::Eval::NNUE {
|
||||
if (!Detail::write_parameters(stream, *featureTransformer)) return false;
|
||||
for (std::size_t i = 0; i < LayerStacks; ++i)
|
||||
if (!Detail::write_parameters(stream, *(network[i]))) return false;
|
||||
return (bool)stream;
|
||||
return bool(stream);
|
||||
}
|
||||
|
||||
void hint_common_parent_position(const Position& pos) {
|
||||
@@ -281,8 +281,8 @@ namespace Stockfish::Eval::NNUE {
|
||||
// A lambda to output one box of the board
|
||||
auto writeSquare = [&board](File file, Rank rank, Piece pc, Value value) {
|
||||
|
||||
const int x = ((int)file) * 8;
|
||||
const int y = (7 - (int)rank) * 3;
|
||||
const int x = int(file) * 8;
|
||||
const int y = (7 - int(rank)) * 3;
|
||||
for (int i = 1; i < 8; ++i)
|
||||
board[y][x+i] = board[y+3][x+i] = '-';
|
||||
for (int i = 1; i < 3; ++i)
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace Stockfish::Eval::NNUE::Layers {
|
||||
vec_t sum0 = vec_setzero();
|
||||
const auto row0 = reinterpret_cast<const vec_t*>(&weights[0]);
|
||||
|
||||
for (int j = 0; j < (int)NumChunks; ++j)
|
||||
for (int j = 0; j < int(NumChunks); ++j)
|
||||
{
|
||||
const vec_t in = inputVector[j];
|
||||
vec_add_dpbusd_32(sum0, in, row0[j]);
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Stockfish::Eval::NNUE::Layers {
|
||||
for (IndexType j = 0; j < InputsPerChunk; ++j)
|
||||
{
|
||||
const vec_t inputChunk = inputVector[i * InputsPerChunk + j];
|
||||
nnz |= (unsigned)vec_nnz(inputChunk) << (j * InputSimdWidth);
|
||||
nnz |= unsigned(vec_nnz(inputChunk)) << (j * InputSimdWidth);
|
||||
}
|
||||
for (IndexType j = 0; j < OutputsPerChunk; ++j)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user