diff options
author | dan sinclair <dj2@everburning.com> | 2018-08-07 09:10:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-07 09:10:25 -0400 |
commit | e3ea909ebe51ef8bd5229f6686bc19ea3c3e1c56 (patch) | |
tree | 6b453d3a42cac76363a65581e70924e52106ac20 /source/comp | |
parent | 05057c9846f195a5d5ad6b4b24b2bd9b1b447322 (diff) |
Simplify MoveToFront (#1806)
This CL removes the templating from the MoveToFront code as all non-test
code uses uint32_t as the variable.
Diffstat (limited to 'source/comp')
-rw-r--r-- | source/comp/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/comp/markv_codec.cpp | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/comp/CMakeLists.txt b/source/comp/CMakeLists.txt index ff52d5e1..250109d3 100644 --- a/source/comp/CMakeLists.txt +++ b/source/comp/CMakeLists.txt @@ -13,7 +13,10 @@ # limitations under the License. if(SPIRV_BUILD_COMPRESSION) - add_library(SPIRV-Tools-comp markv_codec.cpp) + add_library(SPIRV-Tools-comp + markv_codec.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/../util/move_to_front.h + ${CMAKE_CURRENT_SOURCE_DIR}/../util/move_to_front.cpp) spvtools_default_compile_options(SPIRV-Tools-comp) target_include_directories(SPIRV-Tools-comp diff --git a/source/comp/markv_codec.cpp b/source/comp/markv_codec.cpp index 931c4c24..4b1f24f6 100644 --- a/source/comp/markv_codec.cpp +++ b/source/comp/markv_codec.cpp @@ -69,8 +69,6 @@ namespace { using utils::BitReaderWord64; using utils::BitWriterWord64; using utils::HuffmanCodec; -using MoveToFront = utils::MoveToFront<uint32_t>; -using MultiMoveToFront = utils::MultiMoveToFront<uint32_t>; const uint32_t kSpirvMagicNumber = SpvMagicNumber; const uint32_t kMarkvMagicNumber = 0x07230303; @@ -532,7 +530,7 @@ class MarkvCodecBase { std::unordered_map<uint32_t, uint32_t> id_to_type_id_; // Container for all move-to-front sequences. - MultiMoveToFront multi_mtf_; + utils::MultiMoveToFront multi_mtf_; // Id of the current function or zero if outside of function. uint32_t cur_function_id_ = 0; |