Skip to content

Commit

Permalink
Atomic contempt. Bench: 5072738
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefano80 committed Feb 8, 2018
1 parent 30eae36 commit 0eb9ea3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <cstring> // For std::memset
#include <iomanip>
#include <sstream>
#include <atomic>

#include "bitboard.h"
#include "evaluate.h"
Expand Down Expand Up @@ -905,7 +906,7 @@ namespace {

} // namespace

Score Eval::Contempt = SCORE_ZERO;
std::atomic<Score> Eval::Contempt;

/// evaluate() is the evaluator for the outer world. It returns a static evaluation
/// of the position from the point of view of the side to move.
Expand Down
3 changes: 2 additions & 1 deletion src/evaluate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define EVALUATE_H_INCLUDED

#include <string>
#include <atomic>

#include "types.h"

Expand All @@ -31,7 +32,7 @@ namespace Eval {

const Value Tempo = Value(20); // Must be visible to search

extern Score Contempt;
extern std::atomic<Score> Contempt;

std::string trace(const Position& pos);

Expand Down

0 comments on commit 0eb9ea3

Please sign in to comment.