From 2be153ca67b0ff8a9edca900ddd17899b96ee758 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Tue, 9 Jun 2020 14:37:55 +0200 Subject: [PATCH] only point out decoder errors if decoder is sure --- tests/simplex_regression_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/simplex_regression_test.cc b/tests/simplex_regression_test.cc index 645ff86..625ccaa 100644 --- a/tests/simplex_regression_test.cc +++ b/tests/simplex_regression_test.cc @@ -110,8 +110,8 @@ int main() for (int i = 0; i < CODE_LEN; ++i) quantization_erasures += !noisy[i]; uncorrected_errors += dec < 0 ? DATA_LEN : popcnt(dat^dec); - for (int i = 0; i < DATA_LEN; ++i) - decoder_errors += (dec < 0 || ((dec^dat)&(1< 0; + for (int i = 0; dec >= 0 && i < DATA_LEN; ++i) + decoder_errors += ((dec^dat)&(1< 0; } float bit_error_rate = (float)uncorrected_errors / (float)(DATA_LEN * LOOPS); if (bit_error_rate < 0.0001)