]> git.sesse.net Git - stockfish/blobdiff - src/nnue/layers/input_slice.h
Unify naming convention of the NNUE code
[stockfish] / src / nnue / layers / input_slice.h
index 43b06eec5a943066b2b686b6ff27657605321e98..f113b911239d789fc487a6ae9dc32462fa8c0aa5 100644 (file)
 namespace Stockfish::Eval::NNUE::Layers {
 
 // Input layer
-template <IndexType OutputDimensions, IndexType Offset = 0>
+template <IndexType OutDims, IndexType Offset = 0>
 class InputSlice {
  public:
   // Need to maintain alignment
-  static_assert(Offset % kMaxSimdWidth == 0, "");
+  static_assert(Offset % MaxSimdWidth == 0, "");
 
   // Output type
   using OutputType = TransformedFeatureType;
 
   // Output dimensionality
-  static constexpr IndexType kOutputDimensions = OutputDimensions;
+  static constexpr IndexType OutputDimensions = OutDims;
 
   // Size of forward propagation buffer used from the input layer to this layer
-  static constexpr std::size_t kBufferSize = 0;
+  static constexpr std::size_t BufferSize = 0;
 
   // Hash value embedded in the evaluation file
-  static constexpr std::uint32_t GetHashValue() {
-    std::uint32_t hash_value = 0xEC42E90Du;
-    hash_value ^= kOutputDimensions ^ (Offset << 10);
-    return hash_value;
+  static constexpr std::uint32_t get_hash_value() {
+    std::uint32_t hashValue = 0xEC42E90Du;
+    hashValue ^= OutputDimensions ^ (Offset << 10);
+    return hashValue;
   }
 
   // Read network parameters
-  bool ReadParameters(std::istream& /*stream*/) {
+  bool read_parameters(std::istream& /*stream*/) {
     return true;
   }
 
   // Forward propagation
-  const OutputType* Propagate(
-      const TransformedFeatureType* transformed_features,
+  const OutputType* propagate(
+      const TransformedFeatureType* transformedFeatures,
       char* /*buffer*/) const {
-    return transformed_features + Offset;
+    return transformedFeatures + Offset;
   }
 
  private: