TurboPFor: TurboPFor encode

This commit is contained in:
x
2017-01-05 17:19:36 +01:00
parent 75025f4462
commit d82eaeba7e

15
vp4c.c
View File

@ -22,7 +22,7 @@
- email : powturbo [_AT_] gmail [_DOT_] com
**/
// "Integer Compression" Turbo PFor/PforDelta
#ifndef USIZE
#ifndef USIZE
#include <stdint.h>
#include "conf.h"
@ -66,7 +66,9 @@
#undef _P4BITS
#ifndef NSIMD
#define EXCEP 1 //
#ifdef __SSE2__
//-- SIMD: Vertical bitpacking
#define VSIZE 128
#define _P4ENC _p4enc128v
@ -78,8 +80,9 @@
#undef _P4ENC
#undef P4ENC
#undef BITPACK
#endif
#ifdef __AVX2__
#ifdef __AVX2__
#define VSIZE 256
#define _P4ENC _p4enc256v
#define P4ENC p4enc256v
@ -89,10 +92,12 @@
#undef _P4ENC
#undef P4ENC
#undef BITPACK
#endif
#endif
#endif
#undef USIZE
#else
#else
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses"
@ -206,7 +211,7 @@ unsigned char *TEMPLATE2(P4ENC, USIZE)(uint_t *__restrict in, unsigned n, unsign
}
}*/
#pragma clang diagnostic pop
#endif
#endif
/*
111 : 32 bits = bitpack b=32 if bits=0x1f EOB
000 : bitpack = bitpack no exp b=0..5