MCPcopy Create free account
hub / github.com/cwida/ALP / encode

Method encode

include/alp/encoder.hpp:402–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 }
401
402 static inline void encode(const PT* input_vector,
403 PT* exceptions,
404 uint16_t* exceptions_positions,
405 uint16_t* exceptions_count,
406 ST* encoded_integers,
407 state<PT>& stt) {
408
409 if (stt.k_combinations > 1) { // Only if more than 1 found top combinations we sample and search
410 find_best_exponent_factor_from_combinations(
411 stt.best_k_combinations, stt.k_combinations, input_vector, stt.vector_size, stt.fac, stt.exp);
412 } else {
413 stt.exp = stt.best_k_combinations[0].first;
414 stt.fac = stt.best_k_combinations[0].second;
415 }
416 encode_simdized(
417 input_vector, exceptions, exceptions_positions, exceptions_count, encoded_integers, stt.fac, stt.exp);
418 }
419
420 static inline void
421 init(const PT* data_column, const size_t column_offset, const size_t tuples_count, PT* sample_arr, state<PT>& stt) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected