Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45408 )

Change subject: mem-cache: Rename Encoder namespace as encoder
......................................................................

mem-cache: Rename Encoder namespace as encoder

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

compression::Encoder became compression::encoder.

Change-Id: I3ff2693fbbfc366952cf0f03414a00debae27635
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/mem/cache/compressors/encoders/base.hh
M src/mem/cache/compressors/encoders/huffman.cc
M src/mem/cache/compressors/encoders/huffman.hh
M src/mem/cache/compressors/frequent_values.cc
M src/mem/cache/compressors/frequent_values.hh
5 files changed, 14 insertions(+), 11 deletions(-)



diff --git a/src/mem/cache/compressors/encoders/base.hh b/src/mem/cache/compressors/encoders/base.hh
index 8ca1168..a7b7aaf 100644
--- a/src/mem/cache/compressors/encoders/base.hh
+++ b/src/mem/cache/compressors/encoders/base.hh
@@ -31,8 +31,11 @@

 #include <cstdint>

+#include "base/compiler.hh"
+
 namespace compression {
-namespace Encoder {
+GEM5_DEPRECATED_NAMESPACE(Encoder, encoder);
+namespace encoder {

 struct Code
 {
@@ -73,7 +76,7 @@
     virtual uint64_t decode(const uint64_t code) const = 0;
 };

-} // namespace Encoder
+} // namespace encoder
 } // namespace compression

 #endif //__MEM_CACHE_COMPRESSORS_ENCODERS_BASE_HH__
diff --git a/src/mem/cache/compressors/encoders/huffman.cc b/src/mem/cache/compressors/encoders/huffman.cc
index a6b19f7..b005d26 100644
--- a/src/mem/cache/compressors/encoders/huffman.cc
+++ b/src/mem/cache/compressors/encoders/huffman.cc
@@ -33,7 +33,7 @@
 #include "base/logging.hh"

 namespace compression {
-namespace Encoder {
+namespace encoder {

 Huffman::Huffman(uint64_t max_code_length)
   : Base(), maxCodeLength(max_code_length)
@@ -130,5 +130,5 @@
     return it->second;
 }

-} // namespace Encoder
+} // namespace encoder
 } // namespace compression
diff --git a/src/mem/cache/compressors/encoders/huffman.hh b/src/mem/cache/compressors/encoders/huffman.hh
index 27b79f0..f1379af 100644
--- a/src/mem/cache/compressors/encoders/huffman.hh
+++ b/src/mem/cache/compressors/encoders/huffman.hh
@@ -39,7 +39,7 @@
 #include "mem/cache/compressors/encoders/base.hh"

 namespace compression {
-namespace Encoder {
+namespace encoder {

 /**
  * This encoder builds a Huffman tree using the frequency of each value to
@@ -174,7 +174,7 @@
     void generateCodes(const Node* node, const Code& current_code);
 };

-} // namespace Encoder
+} // namespace encoder
 } // namespace compression

 #endif //__MEM_CACHE_COMPRESSORS_ENCODERS_HUFFMAN_HH__
diff --git a/src/mem/cache/compressors/frequent_values.cc b/src/mem/cache/compressors/frequent_values.cc
index e41be12..4a8f925 100644
--- a/src/mem/cache/compressors/frequent_values.cc
+++ b/src/mem/cache/compressors/frequent_values.cc
@@ -67,7 +67,7 @@
     // Compress every value sequentially. The compressed values are then
     // added to the final compressed data.
     for (const auto& chunk : chunks) {
-        Encoder::Code code;
+        encoder::Code code;
         int length = 0;
         if (phase == COMPRESSING) {
             VFTEntry* entry = VFT.findEntry(chunk, false);
@@ -141,7 +141,7 @@
                 // its corresponding value, in order to make life easier we
                 // search for the value and verify that the stored code
                 // matches the table's
-                GEM5_VAR_USED const Encoder::Code code =
+                GEM5_VAR_USED const encoder::Code code =
                     indexEncoder.encode(comp_chunk.value);

// Either the value will be found and the codes match, or the diff --git a/src/mem/cache/compressors/frequent_values.hh b/src/mem/cache/compressors/frequent_values.hh
index 2788583..fd4b33f 100644
--- a/src/mem/cache/compressors/frequent_values.hh
+++ b/src/mem/cache/compressors/frequent_values.hh
@@ -80,7 +80,7 @@
     const bool useHuffmanEncoding;

     /** The encoder applied to the VFT indices. */
-    Encoder::Huffman indexEncoder;
+    encoder::Huffman indexEncoder;

     /** Number of bits in the saturating counters. */
     const int counterBits;
@@ -197,7 +197,7 @@
     struct CompressedValue
     {
         /** The codeword.*/
-        Encoder::Code code;
+        encoder::Code code;

         /**
          * Original value, stored both for when the codeword marks an
@@ -205,7 +205,7 @@
          */
         uint64_t value;

-        CompressedValue(Encoder::Code _code, uint64_t _value)
+        CompressedValue(encoder::Code _code, uint64_t _value)
           : code(_code), value(_value)
         {
         }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45408
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3ff2693fbbfc366952cf0f03414a00debae27635
Gerrit-Change-Number: 45408
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to