blob: 87c3c87636ca98859fa04cfbc58a317f59218761 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "entry_ref_filter.h"
namespace vespalib::datastore {
EntryRefFilter::EntryRefFilter(std::vector<bool> filter, uint32_t offset_bits)
: _filter(std::move(filter)),
_offset_bits(offset_bits)
{
}
EntryRefFilter::EntryRefFilter(uint32_t num_buffers, uint32_t offset_bits)
: _filter(num_buffers),
_offset_bits(offset_bits)
{
}
EntryRefFilter::~EntryRefFilter() = default;
EntryRefFilter
EntryRefFilter::create_all_filter(uint32_t num_buffers, uint32_t offset_bits)
{
std::vector<bool> filter(num_buffers, true);
return EntryRefFilter(std::move(filter), offset_bits);
}
}
|