Lines Matching refs:countLeadingZeros
37 TEST(MathExtras, countLeadingZeros) { in TEST() argument
42 EXPECT_EQ(8u, countLeadingZeros(Z8)); in TEST()
43 EXPECT_EQ(16u, countLeadingZeros(Z16)); in TEST()
44 EXPECT_EQ(32u, countLeadingZeros(Z32)); in TEST()
45 EXPECT_EQ(64u, countLeadingZeros(Z64)); in TEST()
51 EXPECT_EQ(2u, countLeadingZeros(NZ8)); in TEST()
52 EXPECT_EQ(10u, countLeadingZeros(NZ16)); in TEST()
53 EXPECT_EQ(26u, countLeadingZeros(NZ32)); in TEST()
54 EXPECT_EQ(58u, countLeadingZeros(NZ64)); in TEST()
56 EXPECT_EQ(8u, countLeadingZeros(0x00F000FFu)); in TEST()
57 EXPECT_EQ(8u, countLeadingZeros(0x00F12345u)); in TEST()
59 EXPECT_EQ(31 - i, countLeadingZeros(1u << i)); in TEST()
62 EXPECT_EQ(8u, countLeadingZeros(0x00F1234500F12345ULL)); in TEST()
63 EXPECT_EQ(1u, countLeadingZeros(1ULL << 62)); in TEST()
65 EXPECT_EQ(63 - i, countLeadingZeros(1ULL << i)); in TEST()