removed value_type interface on BCH to make room

This commit is contained in:
Ahmet Inan 2018-09-21 08:48:22 +02:00
commit e2b160385e
4 changed files with 4 additions and 16 deletions

View file

@ -19,7 +19,7 @@ int main()
BCH encode({0b10011, 0b11111, 0b00111});
uint8_t code[15] = { 1, 1, 0, 0, 1 };
uint8_t target[15] = { 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0 };
encode(code);
encode(reinterpret_cast<GF::ValueType *>(code));
for (int i = 0; i < 15; ++i)
assert(code[i] == target[i]);
}
@ -36,7 +36,7 @@ int main()
uint16_t parity[192] = { 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0 };
for (int i = 0; i < 192; ++i)
target[65343+i] = parity[i];
(*encode)(code);
(*encode)(reinterpret_cast<GF::ValueType *>(code));
for (int i = 0; i < 65535; ++i)
assert(code[i] == target[i]);
delete[] target;