MCPcopy Create free account
hub / github.com/aff3ct/aff3ct / _encode

Method _encode

src/Module/Encoder/RSC_DB/Encoder_RSC_DB.cpp:238–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236
237template<typename B>
238void
239Encoder_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
261template<typename B>
262std::vector<std::vector<int>>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected