MCPcopy Create free account
hub / github.com/bytedance/bolt / enableValueIds

Method enableValueIds

bolt/exec/VectorHasher.cpp:789–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

787}
788
789uint64_t VectorHasher::enableValueIds(uint64_t multiplier, int32_t reservePct) {
790 BOLT_CHECK_NE(
791 typeKind_,
792 TypeKind::BOOLEAN,
793 "A boolean VectorHasher should always be by range");
794 multiplier_ = multiplier;
795 rangeSize_ = addIdReserve(uniqueValues_.size(), reservePct) + 1;
796 isRange_ = false;
797 uint64_t result;
798 if (__builtin_mul_overflow(multiplier_, rangeSize_, &result)) {
799 return kRangeTooLarge;
800 }
801 return result;
802}
803
804uint64_t VectorHasher::enableValueRange(
805 uint64_t multiplier,

Callers 4

setHasherModeMethod · 0.80
TEST_FFunction · 0.80
computeValueIdsMethod · 0.80

Calls 2

addIdReserveFunction · 0.85
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.64