mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-17 08:18:07 -04:00
chore(segmenter): cannot easily use ranges algorithms for bloom filter
This commit is contained in:
parent
e252182171
commit
d11a591837
@ -229,12 +229,16 @@ class alignas(64) bloom_filter {
|
|||||||
// size in bits
|
// size in bits
|
||||||
DWARFS_FORCE_INLINE size_t size() const { return size_; }
|
DWARFS_FORCE_INLINE size_t size() const { return size_; }
|
||||||
|
|
||||||
void clear() { std::fill(begin(), end(), 0); }
|
void clear() {
|
||||||
|
// NOLINTNEXTLINE(modernize-use-ranges)
|
||||||
|
std::fill(begin(), end(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
void merge(bloom_filter const& other) {
|
void merge(bloom_filter const& other) {
|
||||||
if (size() != other.size()) {
|
if (size() != other.size()) {
|
||||||
throw std::runtime_error("size mismatch");
|
throw std::runtime_error("size mismatch");
|
||||||
}
|
}
|
||||||
|
// NOLINTNEXTLINE(modernize-use-ranges)
|
||||||
std::transform(cbegin(), cend(), other.cbegin(), begin(), std::bit_or<>{});
|
std::transform(cbegin(), cend(), other.cbegin(), begin(), std::bit_or<>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user