mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Fix comparison of integers with different signedness.
This commit is contained in:
@@ -214,7 +214,7 @@ namespace Eval::NNUE {
|
||||
std::vector<double> gradient_norm_local(thread_pool.size(), 0.0);
|
||||
|
||||
auto prev_batch_begin = examples.end();
|
||||
while (prev_batch_begin - examples.begin() >= batch_size) {
|
||||
while ((long)(prev_batch_begin - examples.begin()) >= (long)batch_size) {
|
||||
auto batch_begin = prev_batch_begin - batch_size;
|
||||
auto batch_end = prev_batch_begin;
|
||||
auto size = batch_end - batch_begin;
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace Eval::NNUE {
|
||||
{
|
||||
const auto size = batch_end - batch_begin;
|
||||
|
||||
if (output_.size() < kOutputDimensions * size) {
|
||||
if ((long)output_.size() < (long)kOutputDimensions * size) {
|
||||
output_.resize(kOutputDimensions * size);
|
||||
gradients_.resize(kInputDimensions * size);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Eval::NNUE {
|
||||
{
|
||||
const auto size = batch_end - batch_begin;
|
||||
|
||||
if (output_.size() < kOutputDimensions * size) {
|
||||
if ((long)output_.size() < (long)kOutputDimensions * size) {
|
||||
output_.resize(kOutputDimensions * size);
|
||||
gradients_.resize(kInputDimensions * size);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Eval::NNUE {
|
||||
{
|
||||
const auto size = batch_end - batch_begin;
|
||||
|
||||
if (output_.size() < kOutputDimensions * size) {
|
||||
if ((long)output_.size() < (long)kOutputDimensions * size) {
|
||||
output_.resize(kOutputDimensions * size);
|
||||
gradients_.resize(kOutputDimensions * size);
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ namespace Eval::NNUE {
|
||||
const LearnFloatType* step_start(ThreadPool& thread_pool, std::vector<Example>::const_iterator batch_begin, std::vector<Example>::const_iterator batch_end)
|
||||
{
|
||||
const auto size = batch_end - batch_begin;
|
||||
|
||||
if (gradients_.size() < kInputDimensions * size) {
|
||||
|
||||
if ((long)gradients_.size() < (long)kInputDimensions * size) {
|
||||
gradients_.resize(kInputDimensions * size);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ namespace Eval::NNUE {
|
||||
{
|
||||
const auto size = batch_end - batch_begin;
|
||||
|
||||
if (output_.size() < kOutputDimensions * size) {
|
||||
if ((long)output_.size() < (long)kOutputDimensions * size) {
|
||||
output_.resize(kOutputDimensions * size);
|
||||
gradients_.resize(kInputDimensions * size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user