MCPcopy Create free account
hub / github.com/citp/BlockSci / setBit

Method setBit

tools/parser/bloom_filter.cpp:40–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void BloomStore::setBit(int64_t bitPos) {
41 assert(bitPos < length);
42 BlockType mask = bitMasks[bitPos % BlockSize];
43 int64_t filePos = bitPos / BlockSize;
44 BlockType *fileEntry = backingFile[filePos];
45 *fileEntry |= mask;
46}
47
48bool BloomStore::isSet(int64_t bitPos) const {
49 return !(((*backingFile[bitPos / BlockSize]) & bitMasks[bitPos % BlockSize]) == 0);

Callers 1

addMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected