| 44 | |
| 45 | template<typename B, typename R> |
| 46 | int |
| 47 | Decoder_RS<B, R>::_decode_hiho(const B* Y_N, int8_t* CWD, B* V_K, const size_t frame_id) |
| 48 | { |
| 49 | // auto t_load = std::chrono::steady_clock::now(); // ----------------------------------------------------------- |
| 50 | // LOAD |
| 51 | spu::tools::Bit_packer::pack(Y_N, YH_N.data(), this->N, 1, false, this->m); |
| 52 | // auto d_load = std::chrono::steady_clock::now() - t_load; |
| 53 | |
| 54 | // auto t_decod = std::chrono::steady_clock::now(); // -------------------------------------------------------- |
| 55 | // DECODE |
| 56 | auto status = this->_decode(YH_N.data(), frame_id); |
| 57 | // auto d_decod = std::chrono::steady_clock::now() - t_decod; |
| 58 | CWD[0] = !status; |
| 59 | // auto t_store = std::chrono::steady_clock::now(); // --------------------------------------------------------- |
| 60 | // STORE |
| 61 | spu::tools::Bit_packer::unpack(YH_N.data() + this->n_rdncy, V_K, this->K, 1, false, this->m); |
| 62 | // auto d_store = std::chrono::steady_clock::now() - t_store; |
| 63 | |
| 64 | // (*this)[dec::tsk::decode_hiho].update_timer(dec::tm::decode_hiho::load, d_load); |
| 65 | // (*this)[dec::tsk::decode_hiho].update_timer(dec::tm::decode_hiho::decode, d_decod); |
| 66 | // (*this)[dec::tsk::decode_hiho].update_timer(dec::tm::decode_hiho::store, d_store); |
| 67 | |
| 68 | return status; |
| 69 | } |
| 70 | |
| 71 | template<typename B, typename R> |
| 72 | int |