diff --git a/sources/middle-layer/analytics/expand.cpp b/sources/middle-layer/analytics/expand.cpp index 6052f46c9..9addd64fc 100644 --- a/sources/middle-layer/analytics/expand.cpp +++ b/sources/middle-layer/analytics/expand.cpp @@ -22,7 +22,7 @@ static inline auto expand(input_stream_t &input_stream, output_stream_t &output_stream, core_sw::dispatcher::aggregates_function_ptr_t aggregates_callback, aggregates_t &aggregates) noexcept -> uint32_t { - const auto table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_expand_table(); + const auto &table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_expand_table(); const auto index = core_sw::dispatcher::get_expand_index(input_stream.bit_width()); const auto expand_impl = table[index]; @@ -115,7 +115,7 @@ auto call_expand(input_stream_t &input_stream, limited_buffer_t &output_buffer, int32_t UNREFERENCED_PARAMETER(numa_id)) noexcept -> analytic_operation_result_t { // Get required aggregates kernel - auto aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); + auto &aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); auto aggregates_index = core_sw::dispatcher::get_aggregates_index(1u); auto aggregates_callback = (input_stream.are_aggregates_disabled()) ? &aggregates_empty_callback : diff --git a/sources/middle-layer/analytics/extract.cpp b/sources/middle-layer/analytics/extract.cpp index d596f6002..6069cb819 100644 --- a/sources/middle-layer/analytics/extract.cpp +++ b/sources/middle-layer/analytics/extract.cpp @@ -21,7 +21,7 @@ static inline auto extract(input_stream_t &input_stream, aggregates_t &aggregates, const uint32_t param_low, const uint32_t param_high) noexcept -> uint32_t { - auto table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_extract_i_table(); + auto &table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_extract_i_table(); uint32_t index = core_sw::dispatcher::get_extract_index(input_stream.bit_width()); auto extract_impl = table[index]; @@ -155,7 +155,7 @@ auto call_extract(input_stream_t &input_stream, uint32_t input_bit_width = input_stream.bit_width(); uint32_t status_code = status_list::ok; - auto aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); + auto &aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); auto aggregates_index = core_sw::dispatcher::get_aggregates_index(input_bit_width); auto aggregates_callback = (input_stream.are_aggregates_disabled()) ? &aggregates_empty_callback : @@ -164,7 +164,7 @@ auto call_extract(input_stream_t &input_stream, if ((input_bit_width == 8u || input_bit_width == 16u || input_bit_width == 32u) && input_stream.stream_format() == stream_format_t::le_format && !input_stream.is_compressed()) { - auto extract_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_extract_table(); + auto &extract_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_extract_table(); uint32_t extract_index = core_sw::dispatcher::get_extract_index(input_bit_width); auto extract_kernel = extract_table[extract_index]; diff --git a/sources/middle-layer/analytics/input_stream.cpp b/sources/middle-layer/analytics/input_stream.cpp index b4266b764..e1f6fd0cb 100644 --- a/sources/middle-layer/analytics/input_stream.cpp +++ b/sources/middle-layer/analytics/input_stream.cpp @@ -189,8 +189,8 @@ auto input_stream_t::unpack(limited_buffer_t &o } auto input_stream_t::initialize_sw_kernels() noexcept -> void { - auto unpack_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_unpack_table(); - auto unpack_prle_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_unpack_prle_table(); + auto &unpack_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_unpack_table(); + auto &unpack_prle_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_unpack_prle_table(); uint32_t is_stream_be = (stream_format_ == stream_format_t::be_format) ? 1 : 0; diff --git a/sources/middle-layer/analytics/output_stream.hpp b/sources/middle-layer/analytics/output_stream.hpp index 8555c5850..481eb1310 100644 --- a/sources/middle-layer/analytics/output_stream.hpp +++ b/sources/middle-layer/analytics/output_stream.hpp @@ -157,7 +157,7 @@ class output_stream_t::builder { stream_.destination_current_ptr_ = stream_.data(); if constexpr(path == execution_path_t::software || path == execution_path_t::auto_detect) { - auto pack_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_pack_index_table(); + auto &pack_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_pack_index_table(); stream_.capacity_ = (std::distance(stream_.begin(), stream_.end()) * byte_bits_size) / stream_.actual_bit_width_; diff --git a/sources/middle-layer/analytics/scan.hpp b/sources/middle-layer/analytics/scan.hpp index 2459e3ca4..60f0b1090 100644 --- a/sources/middle-layer/analytics/scan.hpp +++ b/sources/middle-layer/analytics/scan.hpp @@ -47,7 +47,7 @@ static inline auto scan(input_stream_t &input_stream, aggregates_t &aggregates, uint32_t param_low, uint32_t param_high) noexcept -> uint32_t { - auto table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_scan_i_table(); + auto &table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_scan_i_table(); auto index = core_sw::dispatcher::get_scan_index(input_stream.bit_width(), static_cast(comparator)); auto scan_impl = table[index]; @@ -145,7 +145,7 @@ static inline auto call_scan_sw(input_stream_t &input_stream, auto corrected_param_low = correct_input_param(input_bit_width, param_low); auto corrected_param_high = correct_input_param(input_bit_width, param_high); - auto aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); + auto &aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); auto aggregates_index = core_sw::dispatcher::get_aggregates_index(1u); auto aggregates_callback = (input_stream.are_aggregates_disabled()) ? &aggregates_empty_callback : @@ -155,7 +155,7 @@ static inline auto call_scan_sw(input_stream_t &input_stream, input_stream.stream_format() == stream_format_t::le_format && !input_stream.is_compressed()) { - auto scan_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_scan_table(); + auto &scan_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_scan_table(); auto scan_index = core_sw::dispatcher::get_scan_index(input_bit_width, (uint32_t) comparator); auto scan_kernel = scan_table[scan_index]; diff --git a/sources/middle-layer/analytics/select.cpp b/sources/middle-layer/analytics/select.cpp index 8f99df7d0..25ade7df9 100644 --- a/sources/middle-layer/analytics/select.cpp +++ b/sources/middle-layer/analytics/select.cpp @@ -22,7 +22,7 @@ static inline auto select(input_stream_t &input_stream, limited_buffer_t &output_buffer, core_sw::dispatcher::aggregates_function_ptr_t aggregates_callback, aggregates_t &aggregates) noexcept -> uint32_t { - auto table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_select_table(); + auto &table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_select_table(); const auto index = core_sw::dispatcher::get_select_index(input_stream.bit_width()); const auto select_impl = table[index]; @@ -98,7 +98,7 @@ auto call_select(input_stream_t &input_stream, limited_buffer_t &output_buffer, int32_t UNREFERENCED_PARAMETER(numa_id)) noexcept -> analytic_operation_result_t { // Get required aggregates kernel - auto aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); + auto &aggregates_table = core_sw::dispatcher::kernels_dispatcher::get_instance().get_aggregates_table(); auto aggregates_index = core_sw::dispatcher::get_aggregates_index(1u); auto aggregates_callback = (input_stream.are_aggregates_disabled()) ? &aggregates_empty_callback : diff --git a/sources/middle-layer/compression/huffman_table/huffman_table_utils.cpp b/sources/middle-layer/compression/huffman_table/huffman_table_utils.cpp index 826d9b9c8..6e77b620d 100644 --- a/sources/middle-layer/compression/huffman_table/huffman_table_utils.cpp +++ b/sources/middle-layer/compression/huffman_table/huffman_table_utils.cpp @@ -186,7 +186,7 @@ static inline void store_isal_deflate_header(isal_hufftables *isal_huffman_table header_complete_byte_size += (0u == isal_huffman_table->deflate_hdr_extra_bits) ? 0u : 1u; // Use copy kernel to copy deflate header from isal huffman tables - auto copy_kernel = core_sw::dispatcher::kernels_dispatcher::get_instance().get_memory_copy_table(); + auto ©_kernel = core_sw::dispatcher::kernels_dispatcher::get_instance().get_memory_copy_table(); copy_kernel[0]((uint8_t *) isal_huffman_table->deflate_hdr, compression_table.get_deflate_header_data(), header_complete_byte_size); @@ -1279,4 +1279,3 @@ bool is_equal(qpl_decompression_huffman_table &table, } }; - diff --git a/tools/tests/functional/unit_tests/algorithmic/core_mem_move.cpp b/tools/tests/functional/unit_tests/algorithmic/core_mem_move.cpp index 692c64d5a..fc3239b1e 100644 --- a/tools/tests/functional/unit_tests/algorithmic/core_mem_move.cpp +++ b/tools/tests/functional/unit_tests/algorithmic/core_mem_move.cpp @@ -22,7 +22,7 @@ constexpr uint32_t TEST_SOURCE_SIZE = TEST_ARRAY_SIZE / 2u; constexpr uint32_t TEST_SPAN_SIZE = TEST_ARRAY_SIZE / 4u; static inline qplc_move_t_ptr move() { - static const auto& table = qpl::core_sw::dispatcher::kernels_dispatcher::get_instance().get_move_table(); + static const auto &table = qpl::core_sw::dispatcher::kernels_dispatcher::get_instance().get_move_table(); return (qplc_move_t_ptr)table[0u]; } diff --git a/tools/tests/functional/unit_tests/algorithmic/core_zero_8u.cpp b/tools/tests/functional/unit_tests/algorithmic/core_zero_8u.cpp index f01658199..4f1239934 100644 --- a/tools/tests/functional/unit_tests/algorithmic/core_zero_8u.cpp +++ b/tools/tests/functional/unit_tests/algorithmic/core_zero_8u.cpp @@ -17,7 +17,7 @@ namespace qpl::test { qplc_zero_t_ptr qplc_zero() { - static const auto& table = qpl::core_sw::dispatcher::kernels_dispatcher::get_instance().get_zero_table(); + static const auto &table = qpl::core_sw::dispatcher::kernels_dispatcher::get_instance().get_zero_table(); return (qplc_zero_t_ptr)table[0u]; }