From 7fb1d671f4094495e939562afa79b14f96f5f0b1 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Tue, 13 Feb 2024 12:35:49 +0100 Subject: [PATCH] base list size on constant L --- tests/polar_list_regression_test.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/polar_list_regression_test.cc b/tests/polar_list_regression_test.cc index f9eb109..2426058 100644 --- a/tests/polar_list_regression_test.cc +++ b/tests/polar_list_regression_test.cc @@ -37,20 +37,16 @@ int main() const int C = 32; const int S = 32; #if 1 + const int L = 32; typedef int8_t code_type; double SCALE = 2; #else + const int L = 8; typedef float code_type; double SCALE = 1; #endif -#ifdef __AVX2__ - const int SIZEOF_SIMD = 32; -#else - const int SIZEOF_SIMD = 16; -#endif - const int SIMD_WIDTH = SIZEOF_SIMD / sizeof(code_type); - typedef SIMD simd_type; + typedef SIMD simd_type; std::random_device rd; typedef std::default_random_engine generator; @@ -170,7 +166,7 @@ int main() for (int i = 0; i < N; ++i) noisy[i] = codeword[i]; - int rank[SIMD_WIDTH]; + int rank[L]; auto start = std::chrono::system_clock::now(); if (par_aided) (*par_dec)(rank, decoded, codeword, frozen, M, S, F); @@ -192,7 +188,7 @@ int main() int best = 0; if (crc_aided) { bool error = true; - for (int k = 0; k < SIMD_WIDTH; ++k) { + for (int k = 0; k < L; ++k) { crc.reset(); for (int i = 0; i < K; ++i) crc(decoded[i].v[k] < 0);