Skip to content

Commit

Permalink
BUG: Use 32bit uword on i386 / 64bit on x86-64
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoceros committed Dec 22, 2022
1 parent c363ab3 commit 2fa2e45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ewah_bool_utils/cpp/ewah-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ template <class uword> class EWAHBoolArraySetBitForwardIterator {
return;
} else {
uword t = static_cast<uword>(word & (~word + 1));
answer = literalPosition + countOnes((uword)(t - 1));
answer = literalPosition + countOnes((UWORD)(t - 1));
word ^= t;
}
hasNext = moveToNext();
Expand Down Expand Up @@ -371,7 +371,7 @@ template <class uword> size_t EWAHBoolArray<uword>::numberOfOnes() const {
}
++pointer;
for (size_t k = 0; k < rlw.getNumberOfLiteralWords(); ++k) {
tot += countOnes((uword)buffer[pointer]);
tot += countOnes((UWORD)buffer[pointer]);
++pointer;
}
}
Expand Down

0 comments on commit 2fa2e45

Please sign in to comment.