| 38 | } |
| 39 | |
| 40 | void 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 | |
| 48 | bool BloomStore::isSet(int64_t bitPos) const { |
| 49 | return !(((*backingFile[bitPos / BlockSize]) & bitMasks[bitPos % BlockSize]) == 0); |