blob: 8b0d505e577c1b4b86bd7d440531883b959ce8cb (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "bitword.h"
namespace search {
namespace {
template <typename T>
void fillUp(T * v, T startVal) {
for (size_t i(0); i < (sizeof(T)*8); i++) {
v[i] = startVal << i;
}
}
}
BitWord::Init BitWord::_initializer;
BitWord::Init::Init()
{
fillUp(BitWord::_checkTab, std::numeric_limits<BitWord::Word>::max());
}
BitWord::Word BitWord::_checkTab[BitWord::WordLen];
}
|