Lines Matching refs:SP32
38 typedef ScaledPair<uint32_t> SP32; typedef
42 EXPECT_EQ(getRounded32(0, 0, false), SP32(0, 0)); in TEST()
43 EXPECT_EQ(getRounded32(0, 0, true), SP32(1, 0)); in TEST()
44 EXPECT_EQ(getRounded32(20, 21, true), SP32(21, 21)); in TEST()
45 EXPECT_EQ(getRounded32(UINT32_MAX, 0, false), SP32(UINT32_MAX, 0)); in TEST()
46 EXPECT_EQ(getRounded32(UINT32_MAX, 0, true), SP32(1 << 31, 1)); in TEST()
59 EXPECT_EQ(getAdjusted32(0), SP32(0, 0)); in TEST()
60 EXPECT_EQ(getAdjusted32(0, 5), SP32(0, 5)); in TEST()
61 EXPECT_EQ(getAdjusted32(UINT32_MAX), SP32(UINT32_MAX, 0)); in TEST()
62 EXPECT_EQ(getAdjusted32(Max32In64 << 1), SP32(UINT32_MAX, 1)); in TEST()
63 EXPECT_EQ(getAdjusted32(Max32In64 << 1, 1), SP32(UINT32_MAX, 2)); in TEST()
64 EXPECT_EQ(getAdjusted32(Max32In64 << 31), SP32(UINT32_MAX, 31)); in TEST()
65 EXPECT_EQ(getAdjusted32(Max32In64 << 32), SP32(UINT32_MAX, 32)); in TEST()
66 EXPECT_EQ(getAdjusted32(Max32In64 + 1), SP32(1u << 31, 1)); in TEST()
67 EXPECT_EQ(getAdjusted32(UINT64_MAX), SP32(1u << 31, 33)); in TEST()
82 EXPECT_EQ(SP32(0, 0), getProduct32(0, 0)); in TEST()
83 EXPECT_EQ(SP32(0, 0), getProduct32(0, 1)); in TEST()
84 EXPECT_EQ(SP32(0, 0), getProduct32(0, 33)); in TEST()
87 EXPECT_EQ(SP32(6, 0), getProduct32(2, 3)); in TEST()
88 EXPECT_EQ(SP32(UINT16_MAX / 3 * UINT16_MAX / 5 * 2, 0), in TEST()
96 EXPECT_EQ(SP32(0xf00f1001, 4), getProduct32(0xf00010, 0x1001)); in TEST()
103 EXPECT_EQ(SP32(0xf00f0700, 8), getProduct32(0xf000070, 0x1001)); in TEST()
110 EXPECT_EQ(SP32(0xf00f0801, 8), getProduct32(0xf000080, 0x1001)); in TEST()
113 EXPECT_EQ(SP32(0, 0), getProduct32(1, 0)); in TEST()
114 EXPECT_EQ(SP32(0, 0), getProduct32(33, 0)); in TEST()
115 EXPECT_EQ(SP32(6, 0), getProduct32(3, 2)); in TEST()
116 EXPECT_EQ(SP32(UINT16_MAX / 3 * UINT16_MAX / 5 * 2, 0), in TEST()
118 EXPECT_EQ(SP32(0xf00f1001, 4), getProduct32(0x1001, 0xf00010)); in TEST()
119 EXPECT_EQ(SP32(0xf00f0700, 8), getProduct32(0x1001, 0xf000070)); in TEST()
120 EXPECT_EQ(SP32(0xf00f0801, 8), getProduct32(0x1001, 0xf000080)); in TEST()
135 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 0)); in TEST()
136 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 1)); in TEST()
137 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 73)); in TEST()
138 EXPECT_EQ(SP32(UINT32_MAX, MaxScale), getQuotient32(1, 0)); in TEST()
139 EXPECT_EQ(SP32(UINT32_MAX, MaxScale), getQuotient32(6, 0)); in TEST()
142 EXPECT_EQ(SP32(1u << 31, -31), getQuotient32(1, 1)); in TEST()
143 EXPECT_EQ(SP32(1u << 31, -30), getQuotient32(2, 1)); in TEST()
144 EXPECT_EQ(SP32(1u << 31, -33), getQuotient32(4, 16)); in TEST()
145 EXPECT_EQ(SP32(7u << 29, -29), getQuotient32(7, 1)); in TEST()
146 EXPECT_EQ(SP32(7u << 29, -30), getQuotient32(7, 2)); in TEST()
147 EXPECT_EQ(SP32(7u << 29, -33), getQuotient32(7, 16)); in TEST()
150 EXPECT_EQ(SP32(3u << 30, -30), getQuotient32(9, 3)); in TEST()
151 EXPECT_EQ(SP32(9u << 28, -28), getQuotient32(63, 7)); in TEST()
154 EXPECT_EQ(SP32(0xaaaaaaab, -33), getQuotient32(1, 3)); in TEST()
155 EXPECT_EQ(SP32(0xd5555555, -31), getQuotient32(5, 3)); in TEST()
388 EXPECT_EQ(SP32(1, 0), getSum32(0, 0, 1, 0)); in TEST()
389 EXPECT_EQ(SP32(8, -3), getSum32(0, 0, 8, -3)); in TEST()
390 EXPECT_EQ(SP32(UINT32_MAX, 0), getSum32(0, 0, UINT32_MAX, 0)); in TEST()
393 EXPECT_EQ(SP32(2, 0), getSum32(1, 0, 1, 0)); in TEST()
394 EXPECT_EQ(SP32(3, 0), getSum32(1, 0, 2, 0)); in TEST()
395 EXPECT_EQ(SP32(67, 0), getSum32(7, 0, 60, 0)); in TEST()
398 EXPECT_EQ(SP32(3, 0), getSum32(1, 0, 1, 1)); in TEST()
399 EXPECT_EQ(SP32(4, 0), getSum32(2, 0, 1, 1)); in TEST()
402 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 32, 1, 0)); in TEST()
403 EXPECT_EQ(SP32(UINT32_C(1) << 31, -31), getSum32(1, -32, 1, 0)); in TEST()
406 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1), getSum32(1, 32, 1, 1)); in TEST()
407 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -32), getSum32(1, -32, 1, -1)); in TEST()
410 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 0, UINT32_MAX, 0)); in TEST()
413 EXPECT_EQ(SP32(1, 0), getSum32(1, 0, 0, 0)); in TEST()
414 EXPECT_EQ(SP32(8, -3), getSum32(8, -3, 0, 0)); in TEST()
415 EXPECT_EQ(SP32(UINT32_MAX, 0), getSum32(UINT32_MAX, 0, 0, 0)); in TEST()
416 EXPECT_EQ(SP32(3, 0), getSum32(2, 0, 1, 0)); in TEST()
417 EXPECT_EQ(SP32(67, 0), getSum32(60, 0, 7, 0)); in TEST()
418 EXPECT_EQ(SP32(3, 0), getSum32(1, 1, 1, 0)); in TEST()
419 EXPECT_EQ(SP32(4, 0), getSum32(1, 1, 2, 0)); in TEST()
420 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 0, 1, 32)); in TEST()
421 EXPECT_EQ(SP32(UINT32_C(1) << 31, -31), getSum32(1, 0, 1, -32)); in TEST()
422 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1), getSum32(1, 1, 1, 32)); in TEST()
423 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -32), getSum32(1, -1, 1, -32)); in TEST()
424 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(UINT32_MAX, 0, 1, 0)); in TEST()
468 EXPECT_EQ(SP32(0, 0), getDifference32(1, 0, 1, 0)); in TEST()
469 EXPECT_EQ(SP32(1, 0), getDifference32(2, 0, 1, 0)); in TEST()
470 EXPECT_EQ(SP32(53, 0), getDifference32(60, 0, 7, 0)); in TEST()
473 EXPECT_EQ(SP32(0, 0), getDifference32(2, 0, 1, 1)); in TEST()
476 EXPECT_EQ(SP32(1, 0), getDifference32(1, 0, 0, 0)); in TEST()
477 EXPECT_EQ(SP32(8, -3), getDifference32(8, -3, 0, 0)); in TEST()
478 EXPECT_EQ(SP32(UINT32_MAX, 0), getDifference32(UINT32_MAX, 0, 0, 0)); in TEST()
481 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1), in TEST()
483 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -31), in TEST()
487 EXPECT_EQ(SP32(UINT32_MAX, 0), getDifference32(1, 32, 1, 0)); in TEST()
488 EXPECT_EQ(SP32(UINT32_MAX, -32), getDifference32(1, 0, 1, -32)); in TEST()
491 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, 1, 0)); in TEST()
492 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, 8, -3)); in TEST()
493 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, UINT32_MAX, 0)); in TEST()
494 EXPECT_EQ(SP32(0, 0), getDifference32(7, 0, 60, 0)); in TEST()
495 EXPECT_EQ(SP32(0, 0), getDifference32(1, 0, 1, 1)); in TEST()
496 EXPECT_EQ(SP32(0, 0), getDifference32(1, -32, 1, 0)); in TEST()
497 EXPECT_EQ(SP32(0, 0), getDifference32(1, -32, 1, -1)); in TEST()
500 EXPECT_EQ(SP32(UINT32_C(1) << 26, -31), in TEST()