diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-11-08 02:49:06 -0500 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2023-11-08 02:49:06 -0500 |
commit | 66cf4f6f241f81f359fbd1d9f87ffc3e3946dbe3 (patch) | |
tree | da14d5c3a04a6c26cb6ddd38b5c5c0084e1811cd | |
parent | 38344badf442afa1f6e8ee45c54e95d939efa868 (diff) | |
parent | ac70632f51ce06c9a74fe680b8bff2f45e998bde (diff) | |
download | jgit-66cf4f6f241f81f359fbd1d9f87ffc3e3946dbe3.tar.gz jgit-66cf4f6f241f81f359fbd1d9f87ffc3e3946dbe3.zip |
Merge "ComboBitset: Add Javadoc"
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java index 55c05ef78d..8d8c6a0455 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java @@ -86,6 +86,11 @@ public class BitmapIndexImpl implements BitmapIndex { return position; } + /** + * A bitset for representing small changes (set/remove individual bits) + * relative to an existing EWAH bitmap. Executing bit-vector operations will + * materialize the changes into a fresh EWAH bitmap + */ private static final class ComboBitset { private InflatingBitSet inflatingBitmap; @@ -121,18 +126,21 @@ public class BitmapIndexImpl implements BitmapIndex { return inflatingBitmap.getBitmap(); } + /* In-place or operation */ void or(EWAHCompressedBitmap inbits) { if (toRemove != null) combine(); inflatingBitmap = inflatingBitmap.or(inbits); } + /* In-place andNot operation */ void andNot(EWAHCompressedBitmap inbits) { if (toAdd != null || toRemove != null) combine(); inflatingBitmap = inflatingBitmap.andNot(inbits); } + /* In-place xor operation. */ void xor(EWAHCompressedBitmap inbits) { if (toAdd != null || toRemove != null) combine(); |