Daniel Carvalho has submitted this change. ( 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]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45408
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Hoa Nguyen <[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, 18 insertions(+), 11 deletions(-)

Approvals:
  Hoa Nguyen: Looks good to me, approved
  Jason Lowe-Power: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/cache/compressors/encoders/base.hh b/src/mem/cache/compressors/encoders/base.hh
index 2f58217..b7ab2b9 100644
--- a/src/mem/cache/compressors/encoders/base.hh
+++ b/src/mem/cache/compressors/encoders/base.hh
@@ -36,7 +36,9 @@
 GEM5_DEPRECATED_NAMESPACE(Compressor, compression);
 namespace compression
 {
-namespace Encoder {
+GEM5_DEPRECATED_NAMESPACE(Encoder, encoder);
+namespace encoder
+{

 struct Code
 {
@@ -77,7 +79,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 ec7f44f..b2f8ce2 100644
--- a/src/mem/cache/compressors/encoders/huffman.cc
+++ b/src/mem/cache/compressors/encoders/huffman.cc
@@ -35,7 +35,9 @@
 GEM5_DEPRECATED_NAMESPACE(Compressor, compression);
 namespace compression
 {
-namespace Encoder {
+GEM5_DEPRECATED_NAMESPACE(Encoder, encoder);
+namespace encoder
+{

 Huffman::Huffman(uint64_t max_code_length)
   : Base(), maxCodeLength(max_code_length)
@@ -132,5 +134,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 605c82c..a34c408 100644
--- a/src/mem/cache/compressors/encoders/huffman.hh
+++ b/src/mem/cache/compressors/encoders/huffman.hh
@@ -36,12 +36,15 @@
 #include <queue>
 #include <vector>

+#include "base/compiler.hh"
 #include "mem/cache/compressors/encoders/base.hh"

 GEM5_DEPRECATED_NAMESPACE(Compressor, compression);
 namespace compression
 {
-namespace Encoder {
+GEM5_DEPRECATED_NAMESPACE(Encoder, encoder);
+namespace encoder
+{

 /**
  * This encoder builds a Huffman tree using the frequency of each value to
@@ -176,7 +179,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 a44c179..2a21124 100644
--- a/src/mem/cache/compressors/frequent_values.cc
+++ b/src/mem/cache/compressors/frequent_values.cc
@@ -70,7 +70,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);
@@ -144,7 +144,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 e618dbc..d005c4e 100644
--- a/src/mem/cache/compressors/frequent_values.hh
+++ b/src/mem/cache/compressors/frequent_values.hh
@@ -82,7 +82,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;
@@ -199,7 +199,7 @@
     struct CompressedValue
     {
         /** The codeword.*/
-        Encoder::Code code;
+        encoder::Code code;

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

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



5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 10
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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