| 236 | |
| 237 | template<typename B> |
| 238 | void |
| 239 | Encoder_RSC_DB<B>::_encode(const B* U_K, B* X_N, const size_t /*frame_id*/) |
| 240 | { |
| 241 | int circ_state, end_state; |
| 242 | __pre_encode(U_K, circ_state); |
| 243 | int init_state = circ_states[((this->K / 2) % (n_states - 1)) - 1][circ_state]; |
| 244 | if (this->buffered_encoding) |
| 245 | { |
| 246 | std::copy(U_K, U_K + this->K, X_N); |
| 247 | __encode_from_state(U_K, X_N + this->K, true, init_state, end_state); |
| 248 | } |
| 249 | else |
| 250 | __encode_from_state(U_K, X_N, false, init_state, end_state); |
| 251 | |
| 252 | if (init_state != end_state) |
| 253 | { |
| 254 | std::stringstream message; |
| 255 | message << "'end_state' should match 'init_state' ('end_state' = " << end_state |
| 256 | << ", 'init_state' = " << init_state << ")."; |
| 257 | throw spu::tools::runtime_error(__FILE__, __LINE__, __func__, message.str()); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | template<typename B> |
| 262 | std::vector<std::vector<int>> |
nothing calls this directly
no outgoing calls
no test coverage detected