17 #include <immintrin.h> 51 uint32_t selector_bits_used;
52 uint64_t accumulated_selector;
53 typedef uint32_t integer;
67 return _tzcnt_u64(value) + 1;
70 forceinline
void push_selector(uint32_t *&destination, uint8_t raw);
71 uint8_t forceinline decode_selector(
const uint32_t *&selector_set);
86 virtual size_t encode(
void *encoded,
size_t encoded_buffer_length,
const integer *source,
size_t source_integers);
99 virtual void decode(integer *decoded,
size_t integers_to_decode,
const void *source,
size_t source_length);
114 virtual long long compress(
unsigned char *destination,
long long destination_length, uint32_t *source,
long long source_integers)
116 return encode(destination, destination_length, source, source_integers);
119 virtual void decompress(uint32_t *destination,
unsigned char *source,
long long destination_integers)
virtual void decode(integer *decoded, size_t integers_to_decode, const void *source, size_t source_length)
Decode a sequence of integers encoded with this codex.
Definition: compress_integer_elias_delta_simd.cpp:320
virtual size_t encode(void *encoded, size_t encoded_buffer_length, const integer *source, size_t source_integers)
Encode a sequence of integers returning the number of bytes used for the encoding, or 0 if the encoded sequence doesn't fit in the buffer.
Definition: compress_integer_elias_delta_simd.c:100
static forceinline uint64_t find_first_set_bit(uint64_t value)
return the position of the least significant set bit (using a single machine code instruction) ...
Definition: compress_integer_elias_delta_simd.h:65
static void unittest(void)
Unit test this class.
Definition: compress_integer_elias_delta_simd.c:457
operating system and compiler independant definition of forceinline
Definition: compress.h:14
SIMD compression (line Simple-9) using Elias delta to encode the selectors.
Definition: compress_integer_elias_delta_simd.h:48
Definition: compress_integer_elias_delta_simd.c:23