GithubHelp home page GithubHelp logo

Comments (6)

wshager avatar wshager commented on June 2, 2024

Ah I think this has to do with the offset remaining zero for each new set of 128 integers. Nevermind.

from simdcomp.

cruppstahl avatar cruppstahl commented on June 2, 2024

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.

wshager avatar wshager commented on June 2, 2024

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.

cruppstahl avatar cruppstahl commented on June 2, 2024

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.

wshager avatar wshager commented on June 2, 2024

@cruppstahl ah you're right of course. Thanks.

from simdcomp.

lemire avatar lemire commented on June 2, 2024

@wshager Is there still an issue or can we close this?

from simdcomp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.