Skip to content

A question about __PackedArray_pack_ code #4

Description

@NanXiao

Hi @gpakosz ,

Greeting from me!

I am reading PackedArray's code, and come across the following statement:

packed |= *out & ~((uint32_t)(1ULL << ((((uint64_t)count * (uint64_t)PACKEDARRAY_IMPL_BITS_PER_ITEM + startBit - 1) % 32) + 1)) - 1);

Why not just use:

packed |= *out & ~((uint32_t)(1ULL << (((uint64_t)count * (uint64_t)PACKEDARRAY_IMPL_BITS_PER_ITEM + startBit) % 32)) - 1)

What is the difference between these two methods?

Thanks very much in advance!

Bets Regards
Nan Xiao

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions