IcBench App: External libs
This commit is contained in:
@ -6,10 +6,10 @@
|
||||
#if C_FASTPFOR
|
||||
case FP_FASTPFOR: {
|
||||
size_t nvalue = outsize/4;
|
||||
FastPForLib::FastPFor<4> ic; ic.encodeArray((const int32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
FastPForLib::FastPFor<4> ic; ic.encodeArray((const uint32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
if(n & 127) {
|
||||
size_t nvalue2 = outsize/4 - nvalue;
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const int32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const uint32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
nvalue += nvalue2;
|
||||
}
|
||||
ctou32(out) = nvalue;
|
||||
@ -17,10 +17,10 @@
|
||||
}
|
||||
case FP_SIMDFASTPFOR: {
|
||||
size_t nvalue = outsize/4;
|
||||
FastPForLib::SIMDFastPFor<4> ic; ic.encodeArray((const int32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
FastPForLib::SIMDFastPFor<4> ic; ic.encodeArray((const uint32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
if(n & 127) {
|
||||
size_t nvalue2 = outsize/4 - nvalue;
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const int32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const uint32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
nvalue += nvalue2;
|
||||
}
|
||||
ctou32(out) = nvalue;
|
||||
@ -28,10 +28,10 @@
|
||||
}
|
||||
case FP_SIMDOPTPFOR: {
|
||||
size_t nvalue = outsize/4;
|
||||
FastPForLib::SIMDOPTPFor<4> ic; ic.encodeArray((const int32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
FastPForLib::SIMDOPTPFor<4> ic; ic.encodeArray((const uint32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
if(n & 127) {
|
||||
size_t nvalue2 = outsize/4 - nvalue;
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const int32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const uint32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
nvalue += nvalue2;
|
||||
}
|
||||
ctou32(out) = nvalue;
|
||||
@ -39,17 +39,17 @@
|
||||
}
|
||||
case FP_GROUPSIMPLE: {
|
||||
size_t nvalue = outsize/4;
|
||||
FastPForLib::SIMDGroupSimple<false,false> ic; ic.encodeArray((const int32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
FastPForLib::SIMDGroupSimple<false,false> ic; ic.encodeArray((const uint32_t *)in, n & (~127), (uint32_t *)(out+4), nvalue);
|
||||
if(n & 127) {
|
||||
size_t nvalue2 = outsize/4 - nvalue;
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const int32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
FastPForLib::VariableByte vc; vc.encodeArray((const uint32_t *)(in + (n & (~127))), n & 127, (uint32_t *)(out + 4 + nvalue*4), nvalue2);
|
||||
nvalue += nvalue2;
|
||||
}
|
||||
ctou32(out) = nvalue;
|
||||
return out+4+nvalue*4;
|
||||
}
|
||||
case FP_VBYTE: { size_t nvalue=outsize/4; FastPForLib::VariableByte ic; ic.encodeArray((const int32_t *)in, (const size_t)n, (uint32_t *)(out+4), nvalue); ctou32(out)=nvalue; return out+4+nvalue*4; }
|
||||
case FP_SIMPLE8BRLE:{ size_t nvalue=outsize/4; FastPForLib::Simple8b_RLE<true> ic; ic.encodeArray((const int32_t *)in, (const size_t)n, (uint32_t *)(out+4), nvalue); ctou32(out)=nvalue; return out+4+nvalue*4; }
|
||||
case FP_VBYTE: { size_t nvalue=outsize/4; FastPForLib::VariableByte ic; ic.encodeArray((const uint32_t *)in, (const size_t)n, (uint32_t *)(out+4), nvalue); ctou32(out)=nvalue; return out+4+nvalue*4; }
|
||||
case FP_SIMPLE8BRLE:{ size_t nvalue=outsize/4; FastPForLib::Simple8b_RLE<true> ic; ic.encodeArray((const uint32_t *)in, (const size_t)n, (uint32_t *)(out+4), nvalue); ctou32(out)=nvalue; return out+4+nvalue*4; }
|
||||
#endif
|
||||
|
||||
#if C_LIBFOR
|
||||
|
||||
@ -73,8 +73,8 @@
|
||||
case LZ4_BIT: bitdienc32(in, n, (unsigned *)out, -mdelta, mdelta); BITSHUFFLE((unsigned char *)out, _n, sbuf,lev); return out + LZ4_compress((char *)sbuf, (char *)out, _n);
|
||||
#endif
|
||||
case LZ4_ : return out + LZ4_compress((char *)in, (char *)out, _n);
|
||||
case LZ4_NIBBLE:{ bitdienc32(in, n, (unsigned *)out, -mdelta, in); tp4enc((unsigned char *)out, _n, sbuf,lev); return out + LZ4_compress((char *)sbuf, (char *)out, _n); }
|
||||
case LZ4_BYTE: { bitdienc32(in, n, (unsigned *)out, -mdelta, mdelta); tpenc( (unsigned char *)out, _n, sbuf,lev); return out + LZ4_compress((char *)sbuf, (char *)out, _n); }
|
||||
case LZ4_NIBBLE:{ bitdienc32(in, n, (uint32_t *)out, -mdelta, mdelta); tp4enc((unsigned char *)out, _n, sbuf,lev); return out + LZ4_compress((char *)sbuf, (char *)out, _n); }
|
||||
case LZ4_BYTE: { bitdienc32(in, n, (uint32_t *)out, -mdelta, mdelta); tpenc( (unsigned char *)out, _n, sbuf,lev); return out + LZ4_compress((char *)sbuf, (char *)out, _n); }
|
||||
#endif
|
||||
|
||||
#if C_ZLIB
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#if C_FASTPFOR
|
||||
case FP_FASTPFOR: {
|
||||
size_t nvalue = n;
|
||||
FastPForLib::FastPFor<4> ic; const uint32_t *ip = ic.decodeArray((const int32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
FastPForLib::FastPFor<4> ic; const uint32_t *ip = ic.decodeArray((const uint32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
if(n & 127) {
|
||||
nvalue = n - nvalue;
|
||||
FastPForLib::VariableByte vc;
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
case FP_SIMDFASTPFOR: {
|
||||
size_t nvalue = n;
|
||||
FastPForLib::SIMDFastPFor<4> ic; const uint32_t *ip = ic.decodeArray((const int32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
FastPForLib::SIMDFastPFor<4> ic; const uint32_t *ip = ic.decodeArray((const uint32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
if(n & 127) {
|
||||
nvalue = n - nvalue;
|
||||
FastPForLib::VariableByte vc;
|
||||
@ -30,7 +30,7 @@
|
||||
}
|
||||
case FP_SIMDOPTPFOR: {
|
||||
size_t nvalue = n;
|
||||
FastPForLib::SIMDOPTPFor<4> ic; const uint32_t *ip = ic.decodeArray((const int32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
FastPForLib::SIMDOPTPFor<4> ic; const uint32_t *ip = ic.decodeArray((const uint32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
if(n & 127) {
|
||||
nvalue = n - nvalue;
|
||||
FastPForLib::VariableByte vc;
|
||||
@ -40,7 +40,7 @@
|
||||
}
|
||||
case FP_GROUPSIMPLE: {
|
||||
size_t nvalue = n;
|
||||
FastPForLib::SIMDGroupSimple<false,false> ic; const uint32_t *ip = ic.decodeArray((const int32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
FastPForLib::SIMDGroupSimple<false,false> ic; const uint32_t *ip = ic.decodeArray((const uint32_t *)(in+4), ctou32(in), out, nvalue);
|
||||
if(n & 127) {
|
||||
nvalue = n - nvalue;
|
||||
FastPForLib::VariableByte vc;
|
||||
@ -50,9 +50,9 @@
|
||||
}
|
||||
|
||||
case FP_VBYTE: //return vbytedec( in, n, out);
|
||||
{ size_t nvalue=n; FastPForLib::VariableByte ic; return (unsigned char *)ic.decodeArray((const int32_t *)(in+4), ctou32(in), (uint32_t *)out, nvalue); }
|
||||
{ size_t nvalue=n; FastPForLib::VariableByte ic; return (unsigned char *)ic.decodeArray((const uint32_t *)(in+4), ctou32(in), (uint32_t *)out, nvalue); }
|
||||
case FP_SIMPLE8BRLE:
|
||||
{ size_t nvalue=n; FastPForLib::Simple8b_RLE<true> ic; ic.decodeArray((const int32_t *)(in+4), ctou32(in), (uint32_t *)out, nvalue); return in+4+ctou32(in)*4; }
|
||||
{ size_t nvalue=n; FastPForLib::Simple8b_RLE<true> ic; ic.decodeArray((const uint32_t *)(in+4), ctou32(in), (uint32_t *)out, nvalue); return in+4+ctou32(in)*4; }
|
||||
#endif
|
||||
|
||||
#if C_LIBFOR
|
||||
|
||||
@ -141,6 +141,8 @@ unsigned char *vintg8enc(const uint32_t *__restrict in, const size_t length, uns
|
||||
return out; //out + ((compressed_size + 3)/ 4);
|
||||
}
|
||||
|
||||
#define __builtin_ia32_storedqu(dst, result) _mm_storeu_si128(dst,result)
|
||||
|
||||
unsigned char *vintg8dec(unsigned char *__restrict in, const size_t length, uint32_t *__restrict out) {
|
||||
size_t srclength = length * 4;
|
||||
const unsigned *out_ = out + length; //uint32_t * dest = out;size_t nvalue = length * 4; //uint32_t uncompressSize = 0;
|
||||
|
||||
Reference in New Issue
Block a user