]> git.sesse.net Git - stockfish/blobdiff - src/nnue/layers/affine_transform_sparse_input.h
Remove unused return type from propagate()
[stockfish] / src / nnue / layers / affine_transform_sparse_input.h
index a5bea08e74b3fbaea0431a5daf2329d83288e605..134b7d13e191ab8a148b4d458c24d9100540e877 100644 (file)
@@ -102,7 +102,6 @@ namespace Stockfish::Eval::NNUE::Layers {
   template <IndexType InDims, IndexType OutDims>
   class AffineTransformSparseInput {
    public:
-    // Input/output type
     // Input/output type
     using InputType = std::uint8_t;
     using OutputType = std::int32_t;
@@ -135,7 +134,7 @@ namespace Stockfish::Eval::NNUE::Layers {
       return hashValue;
     }
 
-    static IndexType get_weight_index_scrambled(IndexType i)
+    static constexpr IndexType get_weight_index_scrambled(IndexType i)
     {
       return
         (i / ChunkSize) % (PaddedInputDimensions / ChunkSize) * OutputDimensions * ChunkSize +
@@ -143,7 +142,7 @@ namespace Stockfish::Eval::NNUE::Layers {
         i % ChunkSize;
     }
 
-    static IndexType get_weight_index(IndexType i)
+    static constexpr IndexType get_weight_index(IndexType i)
     {
 #if defined (USE_SSSE3)
       return get_weight_index_scrambled(i);
@@ -171,7 +170,7 @@ namespace Stockfish::Eval::NNUE::Layers {
       return !stream.fail();
     }
     // Forward propagation
-    const OutputType* propagate(
+    void propagate(
         const InputType* input, OutputType* output) const {
 
 #if defined (USE_SSSE3)
@@ -230,8 +229,6 @@ namespace Stockfish::Eval::NNUE::Layers {
         PaddedInputDimensions,
         OutputDimensions>(output, weights, biases, input);
 #endif
-
-      return output;
     }
 
    private: