Lines Matching refs:M32
26 typedef MagicNumbersForDivision<uint32_t> M32; typedef
30 static M32 s32(int32_t d) { in s32()
40 static M32 u32(uint32_t d) { return UnsignedDivisionByConstant<uint32_t>(d); } in u32()
45 EXPECT_EQ(M32(0x99999999U, 1, false), s32(-5)); in TEST()
46 EXPECT_EQ(M32(0x55555555U, 1, false), s32(-3)); in TEST()
50 EXPECT_EQ(M32(0x7FFFFFFFU, k - 1, false), s32(d)); in TEST()
53 EXPECT_EQ(M32(0x80000001U, k - 1, false), s32(1 << k)); in TEST()
55 EXPECT_EQ(M32(0x55555556U, 0, false), s32(3)); in TEST()
56 EXPECT_EQ(M32(0x66666667U, 1, false), s32(5)); in TEST()
57 EXPECT_EQ(M32(0x2AAAAAABU, 0, false), s32(6)); in TEST()
58 EXPECT_EQ(M32(0x92492493U, 2, false), s32(7)); in TEST()
59 EXPECT_EQ(M32(0x38E38E39U, 1, false), s32(9)); in TEST()
60 EXPECT_EQ(M32(0x66666667U, 2, false), s32(10)); in TEST()
61 EXPECT_EQ(M32(0x2E8BA2E9U, 1, false), s32(11)); in TEST()
62 EXPECT_EQ(M32(0x2AAAAAABU, 1, false), s32(12)); in TEST()
63 EXPECT_EQ(M32(0x51EB851FU, 3, false), s32(25)); in TEST()
64 EXPECT_EQ(M32(0x10624DD3U, 3, false), s32(125)); in TEST()
65 EXPECT_EQ(M32(0x68DB8BADU, 8, false), s32(625)); in TEST()
70 EXPECT_EQ(M32(0x00000000U, 0, true), u32(1)); in TEST()
72 EXPECT_EQ(M32(1U << (32 - k), 0, false), u32(1U << k)); in TEST()
74 EXPECT_EQ(M32(0xAAAAAAABU, 1, false), u32(3)); in TEST()
75 EXPECT_EQ(M32(0xCCCCCCCDU, 2, false), u32(5)); in TEST()
76 EXPECT_EQ(M32(0xAAAAAAABU, 2, false), u32(6)); in TEST()
77 EXPECT_EQ(M32(0x24924925U, 3, true), u32(7)); in TEST()
78 EXPECT_EQ(M32(0x38E38E39U, 1, false), u32(9)); in TEST()
79 EXPECT_EQ(M32(0xCCCCCCCDU, 3, false), u32(10)); in TEST()
80 EXPECT_EQ(M32(0xBA2E8BA3U, 3, false), u32(11)); in TEST()
81 EXPECT_EQ(M32(0xAAAAAAABU, 3, false), u32(12)); in TEST()
82 EXPECT_EQ(M32(0x51EB851FU, 3, false), u32(25)); in TEST()
83 EXPECT_EQ(M32(0x10624DD3U, 3, false), u32(125)); in TEST()
84 EXPECT_EQ(M32(0xD1B71759U, 9, false), u32(625)); in TEST()