| 334 | |
| 335 | template<typename F> |
| 336 | void AddToOddSyndromes(std::vector<typename F::Elem>& osyndromes, typename F::Elem data, const F& field) { |
| 337 | auto sqr = field.Sqr(data); |
| 338 | typename F::Multiplier mul(field, sqr); |
| 339 | for (auto& osyndrome : osyndromes) { |
| 340 | osyndrome ^= data; |
| 341 | data = mul(data); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | template<typename F> |
| 346 | std::vector<typename F::Elem> FullDecode(const std::vector<typename F::Elem>& osyndromes, const F& field) { |