diff --git a/tools/benchmarks/include/cmd_decl.hpp b/tools/benchmarks/include/cmd_decl.hpp index d9a446557..db469a282 100644 --- a/tools/benchmarks/include/cmd_decl.hpp +++ b/tools/benchmarks/include/cmd_decl.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_CMD_DECL_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_CMD_DECL_HPP #include #include @@ -25,3 +25,4 @@ std::int32_t get_block_size(); mem_loc_e get_in_mem(); mem_loc_e get_out_mem(); } // namespace bench::cmd +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_CMD_DECL_HPP diff --git a/tools/benchmarks/include/data_providers.hpp b/tools/benchmarks/include/data_providers.hpp index 3f6ac764b..79386b238 100644 --- a/tools/benchmarks/include/data_providers.hpp +++ b/tools/benchmarks/include/data_providers.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_DATA_PROVIDERS_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_DATA_PROVIDERS_HPP #include #include @@ -83,3 +83,4 @@ static inline auto split_data(const data_t& data, std::size_t block_size) { return blocks; } } // namespace bench::data +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_DATA_PROVIDERS_HPP diff --git a/tools/benchmarks/include/details/measure_async.hpp b/tools/benchmarks/include/details/measure_async.hpp index b3b5b7c11..52570f66f 100644 --- a/tools/benchmarks/include/details/measure_async.hpp +++ b/tools/benchmarks/include/details/measure_async.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_ASYNC_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_ASYNC_HPP #include @@ -112,3 +112,5 @@ static statistics_t measure_async(benchmark::State& state, const case_params_t& return res; } } // namespace bench::details + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_ASYNC_HPP diff --git a/tools/benchmarks/include/details/measure_sync.hpp b/tools/benchmarks/include/details/measure_sync.hpp index c1b48f408..8b3fb334d 100644 --- a/tools/benchmarks/include/details/measure_sync.hpp +++ b/tools/benchmarks/include/details/measure_sync.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_SYNC_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_SYNC_HPP #include #include @@ -62,3 +62,4 @@ static statistics_t measure_sync(benchmark::State& state, const case_params_t& c return res; } } // namespace bench::details +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_MEASURE_SYNC_HPP diff --git a/tools/benchmarks/include/details/utility.hpp b/tools/benchmarks/include/details/utility.hpp index f2abecbb4..a9d78ea2d 100644 --- a/tools/benchmarks/include/details/utility.hpp +++ b/tools/benchmarks/include/details/utility.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_UTILITY_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_UTILITY_HPP #include "cmd_decl.hpp" @@ -84,3 +84,5 @@ inline void mem_control(RangeT begin, RangeT end, mem_loc_e op) noexcept { __builtin_ia32_mfence(); } } // namespace bench::details + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_DETAILS_UTILITY_HPP diff --git a/tools/benchmarks/include/huffman_table.hpp b/tools/benchmarks/include/huffman_table.hpp index 50d1ef381..e9f182b1a 100644 --- a/tools/benchmarks/include/huffman_table.hpp +++ b/tools/benchmarks/include/huffman_table.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_HUFFMAN_TABLE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_HUFFMAN_TABLE_HPP #include #include @@ -83,3 +83,5 @@ static qpl_huffman_table_t deflate_huffman_table_maker(const qpl_huffman_table_t */ static auto any_huffman_table_deleter = [](qpl_huffman_table_t t) { qpl_huffman_table_destroy(t); }; } // namespace bench + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_HUFFMAN_TABLE_HPP diff --git a/tools/benchmarks/include/measure.hpp b/tools/benchmarks/include/measure.hpp index 81a0315bd..be9013719 100644 --- a/tools/benchmarks/include/measure.hpp +++ b/tools/benchmarks/include/measure.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_MEASURE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_MEASURE_HPP #include #include
@@ -21,3 +21,5 @@ static inline statistics_t measure(benchmark::State& state, const case_params_t& return details::measure_sync(state, common_params, operations, params); } } // namespace bench + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_MEASURE_HPP diff --git a/tools/benchmarks/include/ops/base.hpp b/tools/benchmarks/include/ops/base.hpp index 84a9fbe3e..8b5f35946 100644 --- a/tools/benchmarks/include/ops/base.hpp +++ b/tools/benchmarks/include/ops/base.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_BASE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_BASE_HPP #include #include @@ -116,3 +116,5 @@ class operation_base_t { std::size_t bytes_written_ {0}; }; } // namespace bench::ops + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_BASE_HPP diff --git a/tools/benchmarks/include/ops/c_api/base.hpp b/tools/benchmarks/include/ops/c_api/base.hpp index 1f3d09fe6..093b797bf 100644 --- a/tools/benchmarks/include/ops/c_api/base.hpp +++ b/tools/benchmarks/include/ops/c_api/base.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_BASE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_BASE_HPP #include #include @@ -89,3 +89,5 @@ class operation_base_t : public ops::operation_base_t { qpl_job* job_ {nullptr}; }; } // namespace bench::ops::c_api + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_BASE_HPP diff --git a/tools/benchmarks/include/ops/c_api/crc64.hpp b/tools/benchmarks/include/ops/c_api/crc64.hpp index b831eb0d5..50f529e23 100644 --- a/tools/benchmarks/include/ops/c_api/crc64.hpp +++ b/tools/benchmarks/include/ops/c_api/crc64.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_CRC64_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_CRC64_HPP #include #include @@ -174,3 +174,5 @@ struct traits>> { using result_t = crc64_results_t; }; } // namespace bench::ops + +#endif //QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_CRC64_HPP diff --git a/tools/benchmarks/include/ops/c_api/deflate.hpp b/tools/benchmarks/include/ops/c_api/deflate.hpp index b56045b21..607a0b3db 100644 --- a/tools/benchmarks/include/ops/c_api/deflate.hpp +++ b/tools/benchmarks/include/ops/c_api/deflate.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_DEFLATE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_DEFLATE_HPP #include #include @@ -148,3 +148,5 @@ struct traits>> { using result_t = deflate_results_t; }; } // namespace bench::ops + +#endif //QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_DEFLATE_HPP diff --git a/tools/benchmarks/include/ops/c_api/inflate.hpp b/tools/benchmarks/include/ops/c_api/inflate.hpp index cad71a9d9..4da521fa7 100644 --- a/tools/benchmarks/include/ops/c_api/inflate.hpp +++ b/tools/benchmarks/include/ops/c_api/inflate.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_INFLATE_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_INFLATE_HPP #include #include @@ -138,3 +138,5 @@ struct traits>> { using result_t = inflate_results_t; }; } // namespace bench::ops + +#endif //QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_C_API_INFLATE_HPP diff --git a/tools/benchmarks/include/ops/dispatcher.hpp b/tools/benchmarks/include/ops/dispatcher.hpp index c5f8e2488..d8b4ad458 100644 --- a/tools/benchmarks/include/ops/dispatcher.hpp +++ b/tools/benchmarks/include/ops/dispatcher.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_DISPATCHER_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_DISPATCHER_HPP #include @@ -29,3 +29,5 @@ struct api_dispatcher_t { using impl_t = c_api::crc64_t; }; } // namespace bench::ops + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_DISPATCHER_HPP diff --git a/tools/benchmarks/include/ops/ops.hpp b/tools/benchmarks/include/ops/ops.hpp index 3974fa0d9..706a8a753 100644 --- a/tools/benchmarks/include/ops/ops.hpp +++ b/tools/benchmarks/include/ops/ops.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_OPS_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_OPS_HPP #include @@ -17,3 +17,5 @@ using inflate_t = typename api_dispatcher_t::im template using crc64_t = typename api_dispatcher_t::impl_t; } // namespace bench::ops + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_OPS_HPP diff --git a/tools/benchmarks/include/ops/params.hpp b/tools/benchmarks/include/ops/params.hpp index e8452a204..a8f9e01e2 100644 --- a/tools/benchmarks/include/ops/params.hpp +++ b/tools/benchmarks/include/ops/params.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_PARAMS_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_PARAMS_HPP #include #include @@ -61,3 +61,5 @@ struct crc64_params_t { }; } // namespace bench::ops + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_PARAMS_HPP diff --git a/tools/benchmarks/include/ops/results.hpp b/tools/benchmarks/include/ops/results.hpp index ba6a332b5..fbcdd2195 100644 --- a/tools/benchmarks/include/ops/results.hpp +++ b/tools/benchmarks/include/ops/results.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_RESULTS_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_RESULTS_HPP #include #include @@ -35,3 +35,5 @@ struct crc64_results_t { data_type_t data_; }; } // namespace bench::ops + +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_OPS_RESULTS_HPP diff --git a/tools/benchmarks/include/types.hpp b/tools/benchmarks/include/types.hpp index ed98a7566..382868286 100644 --- a/tools/benchmarks/include/types.hpp +++ b/tools/benchmarks/include/types.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_TYPES_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_TYPES_HPP #include #include @@ -77,3 +77,4 @@ static inline std::uint32_t operator|(mem_loc_mask_e lha, std::uint32_t rha) { return static_cast(lha) | rha; } } // namespace bench +#endif // QPL_TOOLS_BENCHMARKS_INCLUDE_TYPES_HPP diff --git a/tools/benchmarks/include/utility.hpp b/tools/benchmarks/include/utility.hpp index aa6883a0c..f06f237ff 100644 --- a/tools/benchmarks/include/utility.hpp +++ b/tools/benchmarks/include/utility.hpp @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: MIT ******************************************************************************/ - -#pragma once +#ifndef QPL_TOOLS_BENCHMARKS_INCLUDE_UTILITY_HPP +#define QPL_TOOLS_BENCHMARKS_INCLUDE_UTILITY_HPP #include // vector search #include @@ -335,3 +335,5 @@ static inline std::vector to_huffman_type(const std::vector