From 34cc44a5337e2b638cec357ab4bee52f605314ae Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:36:46 +0000 Subject: [PATCH] =?utf8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`cleanup3?= =?utf8?q?`?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @mtl1979. * https://github.com/zlib-ng/zlib-ng/pull/1978#issuecomment-3373304629 The following files were modified: * `test/benchmarks/benchmark_slidehash.cc` --- test/benchmarks/benchmark_slidehash.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/benchmarks/benchmark_slidehash.cc b/test/benchmarks/benchmark_slidehash.cc index 4313450a..6f3b1221 100644 --- a/test/benchmarks/benchmark_slidehash.cc +++ b/test/benchmarks/benchmark_slidehash.cc @@ -24,6 +24,15 @@ private: deflate_state *s_g; public: + /** + * @brief Prepare the benchmark fixture by allocating and initializing working data. + * + * Allocates two 64-byte-aligned arrays of `uint16_t` (one of size HASH_SIZE, one of size MAX_RANDOM_INTS), + * fills them with pseudorandom `uint16_t` values, allocates a `deflate_state` structure, and sets + * its `head` and `prev` pointers to the allocated arrays. + * + * @param state Benchmark-provided state object from Google Benchmark (supplied by the framework). + */ void SetUp(const ::benchmark::State& state) { l0 = (uint16_t *)zng_alloc_aligned(HASH_SIZE * sizeof(uint16_t), 64); @@ -102,4 +111,4 @@ BENCHMARK_SLIDEHASH(lsx, slide_hash_lsx, test_cpu_features.loongarch.has_lsx); BENCHMARK_SLIDEHASH(lasx, slide_hash_lasx, test_cpu_features.loongarch.has_lasx); #endif -#endif +#endif \ No newline at end of file -- 2.47.3