Comments (6)
Ah I think this has to do with the offset remaining zero for each new set of 128 integers. Nevermind.
from simdcomp.
AFAIK there's no way to do that. If you have less than 128 integers then you will have to pad them with garbage, and ignore the garbage when decompressing.
from simdcomp.
Hmm no it doesn't. The offset is always zero in my sample.
@cruppstahl but if I have 128*2 it should decompress correctly, right?
const __m128i * simdunpackd1_length(uint32_t offset, const __m128i * in, size_t length, uint32_t * out, const uint32_t bit) {
size_t k;
for(k = 0; k < length / SIMDBlockSize; ++k) {
simdunpackd1(offset, in, out, bit);
out += SIMDBlockSize;
in += bit;
}
return simdunpack_shortlength(in, length % SIMDBlockSize, out, bit);
}
from simdcomp.
In my code I only compress blocks of 128 integers with simdunpackd1.
If you compress multiple blocks then you have to make sure that the "bit"
is calculated correctly (for both blocks).
Your code looks ok if the offset is always zero (for all blocks, not just
the first!)
2016-01-26 10:05 GMT+01:00 Wouter Hager [email protected]:
Hmm no it doesn't. The offset is always zero in my sample.
@cruppstahl https://github.com/cruppstahl but if I have 128*2 it should
decompress correctly, right?const __m128i * simdunpackd1_length(uint32_t offset, const __m128i * in,
size_t length, uint32_t * out, const uint32_t bit) {
size_t k;
for(k = 0; k < length / SIMDBlockSize; ++k) {
simdunpackd1(offset, in, out, bit);
out += SIMDBlockSize;
in += bit;
}
return simdunpack_shortlength(in, length % SIMDBlockSize, out, bit);
}—
Reply to this email directly or view it on GitHub
#15 (comment).
from simdcomp.
@cruppstahl ah you're right of course. Thanks.
from simdcomp.
@wshager Is there still an issue or can we close this?
from simdcomp.
Related Issues (20)
- SSE2 compatibility should be warranted HOT 21
- simdunpack doesn't decompress the values properly HOT 12
- Javascript version HOT 31
- Which code to use? HOT 3
- Get maxbits for compressed array HOT 2
- How to get the usable bytes from a compressed array? HOT 11
- /GS for release Windows builds HOT 16
- Add to Microsoft's VC++ Packaging Tool
- heap-buffer-overflow (detected by LibFuzzer) HOT 3
- simdcomp vs roaringBitmap HOT 6
- Add ARM64 / Aarch64 support HOT 3
- Packing 2 bits values into a bigger HOT 5
- Use this to compress file? HOT 1
- Could you explain please why using ternary operator instead of bitwise or? HOT 1
- Is it possible to speedup 128 block decoding via 256 bit instructions?
- Comment on performance for uint64_t performance
- how can I compress any size of sorted uint32 array HOT 1
- Unable to compress array of random numbers HOT 1
- Support signed differential coding HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simdcomp.