reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
89 uint64_t scaleByInverse(uint64_t Num) const;
30 Frequency = Prob.scaleByInverse(Frequency);
unittests/Support/BranchProbabilityTest.cpp204 EXPECT_EQ(UINT64_MAX, BP(1, 1).scaleByInverse(UINT64_MAX)); 205 EXPECT_EQ(UINT64_MAX, BP(7, 7).scaleByInverse(UINT64_MAX)); 206 EXPECT_EQ(UINT32_MAX, BP(1, 1).scaleByInverse(UINT32_MAX)); 207 EXPECT_EQ(UINT32_MAX, BP(7, 7).scaleByInverse(UINT32_MAX)); 208 EXPECT_EQ(0u, BP(1, 1).scaleByInverse(0)); 209 EXPECT_EQ(0u, BP(7, 7).scaleByInverse(0)); 214 EXPECT_EQ(UINT64_MAX, BP(1, UINT32_MAX).scaleByInverse(UINT64_MAX)); 216 BP(1, MAX_DENOMINATOR).scaleByInverse(UINT32_MAX)); 217 EXPECT_EQ(MAX_DENOMINATOR, BP(1, MAX_DENOMINATOR).scaleByInverse(1)); 223 EXPECT_EQ(UINT64_MAX - 1, BP(1, 2).scaleByInverse(Two63 - 1)); 224 EXPECT_EQ(UINT64_MAX, BP(1, 2).scaleByInverse(Two63)); 227 EXPECT_EQ(2u, BP(Two31, UINT32_MAX).scaleByInverse(1)); 228 EXPECT_EQ(2u, BP(Two31 - 1, UINT32_MAX).scaleByInverse(1)); 229 EXPECT_EQ(Two31 * 2, BP(Two31, UINT32_MAX).scaleByInverse(Two31)); 230 EXPECT_EQ(Two31 * 2, BP(Two31 - 1, UINT32_MAX).scaleByInverse(Two31)); 231 EXPECT_EQ(UINT64_MAX, BP(Two31, UINT32_MAX).scaleByInverse(Two63 + Two31)); 237 .scaleByInverse(UINT64_C(9223372047592194056))); 239 BP(Two31 + 1, UINT32_MAX).scaleByInverse(Two63 + Two31));