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:
Andrew Noyes 2019-12-05 09:54:36 -08:00
parent db4666508a
commit 55916534fe

View File

@ -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 );
}
};