mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 11:15:50 +08:00
Make orImpl private
As far as I can tell MiniConflictSet2 is meant to be a reference implementation for MiniConflictSet, so let's give them the same API
This commit is contained in:
parent
db4666508a
commit
55916534fe
@ -1092,6 +1092,15 @@ class MiniConflictSet : NonCopyable {
|
||||
}
|
||||
}
|
||||
|
||||
bool orImpl(int begin, int end) {
|
||||
if (begin == end) return false;
|
||||
int beginWord = begin >> bucketShift;
|
||||
int lastWord = ((end + bucketMask) >> bucketShift) - 1;
|
||||
|
||||
return orBits(orValues, beginWord + 1, lastWord, true) || getNthBit(andValues, beginWord) ||
|
||||
getNthBit(andValues, lastWord) || orBits(values, begin, end, false);
|
||||
}
|
||||
|
||||
public:
|
||||
explicit MiniConflictSet( int size ) : debug(size) {
|
||||
static_assert((1<<bucketShift) == sizeof(wordType)*8, "BucketShift incorrect");
|
||||
@ -1119,16 +1128,6 @@ public:
|
||||
ASSERT( a == b );
|
||||
return b;
|
||||
}
|
||||
|
||||
bool orImpl( int begin, int end ) {
|
||||
if (begin == end) return false;
|
||||
int beginWord = begin>>bucketShift;
|
||||
int lastWord = ((end+bucketMask) >> bucketShift) - 1;
|
||||
|
||||
return orBits( orValues, beginWord+1, lastWord, true ) ||
|
||||
getNthBit( andValues, beginWord ) || getNthBit( andValues, lastWord ) ||
|
||||
orBits( values, begin, end, false );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user