these codes are short ..

This commit is contained in:
Ahmet Inan 2020-06-08 10:15:50 +02:00
commit 130af67e08

View file

@ -62,11 +62,6 @@ int main()
typedef std::uniform_int_distribution<int> uniform;
typedef std::normal_distribution<float> normal;
int8_t *code = new int8_t[CODE_LEN];
int8_t *orig = new int8_t[CODE_LEN];
int8_t *noisy = new int8_t[CODE_LEN];
float *symb = new float[CODE_LEN];
float min_SNR = 20;
for (float SNR = -10; SNR <= 10; SNR += 0.1) {
@ -83,6 +78,9 @@ int main()
int uncorrected_errors = 0;
int decoder_errors = 0;
for (int loop = 0; loop < LOOPS; ++loop) {
int8_t code[CODE_LEN], orig[CODE_LEN], noisy[CODE_LEN];
float symb[CODE_LEN];
int dat = data();
encode(code, dat);
@ -131,11 +129,6 @@ int main()
}
}
delete[] code;
delete[] orig;
delete[] noisy;
delete[] symb;
std::cerr << "QEF at: " << min_SNR << " SNR" << std::endl;
assert(min_SNR < QEF_SNR);
std::cerr << "Simplex code regression test passed!" << std::endl;