added Artin Schreier's imap acceleration

This commit is contained in:
Ahmet Inan 2018-09-20 20:50:06 +02:00
commit 61b7c19e68
3 changed files with 31 additions and 11 deletions

View file

@ -19,7 +19,7 @@ public:
typedef typename GF::ValueType ValueType;
typedef typename GF::IndexType IndexType;
static const int N = GF::N, K = N - NR;
ReedSolomonDecoder() {}
ReedSolomonErrorCorrection<NR, FCR, GF> algorithm;
int compute_syndromes(ValueType *code, ValueType *syndromes)
{
// $syndromes_i = code(pe^{FCR+i})$
@ -49,7 +49,7 @@ public:
return 0;
IndexType locations[NR];
ValueType magnitudes[NR];
int count = ReedSolomonErrorCorrection<NR, FCR, GF>::algorithm(syndromes, locations, magnitudes, erasures, erasures_count);
int count = algorithm(syndromes, locations, magnitudes, erasures, erasures_count);
if (count <= 0)
return count;
for (int i = 0; i < count; ++i)