mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-27 04:26:24 +08:00
Add Stockfish namespace.
fixes #3350 and is a small cleanup that might make it easier to use SF in separate projects, like a NNUE trainer or similar. closes https://github.com/official-stockfish/Stockfish/pull/3370 No functional change.
This commit is contained in:
committed by
Joost VandeVondele
parent
9b1274aba3
commit
7ffae17f85
@@ -24,7 +24,7 @@
|
||||
#include "features_common.h"
|
||||
#include <array>
|
||||
|
||||
namespace Eval::NNUE::Features {
|
||||
namespace Stockfish::Eval::NNUE::Features {
|
||||
|
||||
// Class template that represents a list of values
|
||||
template <typename T, T... Values>
|
||||
@@ -64,6 +64,6 @@ namespace Eval::NNUE::Features {
|
||||
|
||||
};
|
||||
|
||||
} // namespace Eval::NNUE::Features
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
#endif // #ifndef NNUE_FEATURE_SET_H_INCLUDED
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "../../evaluate.h"
|
||||
#include "../nnue_common.h"
|
||||
|
||||
namespace Eval::NNUE::Features {
|
||||
namespace Stockfish::Eval::NNUE::Features {
|
||||
|
||||
class IndexList;
|
||||
|
||||
@@ -40,6 +40,6 @@ namespace Eval::NNUE::Features {
|
||||
kFriend // side to move
|
||||
};
|
||||
|
||||
} // namespace Eval::NNUE::Features
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
#endif // #ifndef NNUE_FEATURES_COMMON_H_INCLUDED
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "half_kp.h"
|
||||
#include "index_list.h"
|
||||
|
||||
namespace Eval::NNUE::Features {
|
||||
namespace Stockfish::Eval::NNUE::Features {
|
||||
|
||||
// Orient a square according to perspective (rotates by 180 for black)
|
||||
inline Square orient(Color perspective, Square s) {
|
||||
@@ -65,4 +65,4 @@ namespace Eval::NNUE::Features {
|
||||
|
||||
template class HalfKP<Side::kFriend>;
|
||||
|
||||
} // namespace Eval::NNUE::Features
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "../../evaluate.h"
|
||||
#include "features_common.h"
|
||||
|
||||
namespace Eval::NNUE::Features {
|
||||
namespace Stockfish::Eval::NNUE::Features {
|
||||
|
||||
// Feature HalfKP: Combination of the position of own king
|
||||
// and the position of pieces other than kings
|
||||
@@ -54,6 +54,6 @@ namespace Eval::NNUE::Features {
|
||||
IndexList* removed, IndexList* added);
|
||||
};
|
||||
|
||||
} // namespace Eval::NNUE::Features
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
#endif // #ifndef NNUE_FEATURES_HALF_KP_H_INCLUDED
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "../../position.h"
|
||||
#include "../nnue_architecture.h"
|
||||
|
||||
namespace Eval::NNUE::Features {
|
||||
namespace Stockfish::Eval::NNUE::Features {
|
||||
|
||||
// Class template used for feature index list
|
||||
template <typename T, std::size_t MaxSize>
|
||||
@@ -59,6 +59,6 @@ namespace Eval::NNUE::Features {
|
||||
: public ValueList<IndexType, RawFeatures::kMaxActiveDimensions> {
|
||||
};
|
||||
|
||||
} // namespace Eval::NNUE::Features
|
||||
} // namespace Stockfish::Eval::NNUE::Features
|
||||
|
||||
#endif // NNUE_FEATURES_INDEX_LIST_H_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user