Lines Matching defs:SP32

39 typedef ScaledPair<uint32_t> SP32;
43 EXPECT_EQ(getRounded32(0, 0, false), SP32(0, 0));
44 EXPECT_EQ(getRounded32(0, 0, true), SP32(1, 0));
45 EXPECT_EQ(getRounded32(20, 21, true), SP32(21, 21));
46 EXPECT_EQ(getRounded32(UINT32_MAX, 0, false), SP32(UINT32_MAX, 0));
47 EXPECT_EQ(getRounded32(UINT32_MAX, 0, true), SP32(1 << 31, 1));
60 EXPECT_EQ(getAdjusted32(0), SP32(0, 0));
61 EXPECT_EQ(getAdjusted32(0, 5), SP32(0, 5));
62 EXPECT_EQ(getAdjusted32(UINT32_MAX), SP32(UINT32_MAX, 0));
63 EXPECT_EQ(getAdjusted32(Max32In64 << 1), SP32(UINT32_MAX, 1));
64 EXPECT_EQ(getAdjusted32(Max32In64 << 1, 1), SP32(UINT32_MAX, 2));
65 EXPECT_EQ(getAdjusted32(Max32In64 << 31), SP32(UINT32_MAX, 31));
66 EXPECT_EQ(getAdjusted32(Max32In64 << 32), SP32(UINT32_MAX, 32));
67 EXPECT_EQ(getAdjusted32(Max32In64 + 1), SP32(1u << 31, 1));
68 EXPECT_EQ(getAdjusted32(UINT64_MAX), SP32(1u << 31, 33));
83 EXPECT_EQ(SP32(0, 0), getProduct32(0, 0));
84 EXPECT_EQ(SP32(0, 0), getProduct32(0, 1));
85 EXPECT_EQ(SP32(0, 0), getProduct32(0, 33));
88 EXPECT_EQ(SP32(6, 0), getProduct32(2, 3));
89 EXPECT_EQ(SP32(UINT16_MAX / 3 * UINT16_MAX / 5 * 2, 0),
97 EXPECT_EQ(SP32(0xf00f1001, 4), getProduct32(0xf00010, 0x1001));
104 EXPECT_EQ(SP32(0xf00f0700, 8), getProduct32(0xf000070, 0x1001));
111 EXPECT_EQ(SP32(0xf00f0801, 8), getProduct32(0xf000080, 0x1001));
114 EXPECT_EQ(SP32(0, 0), getProduct32(1, 0));
115 EXPECT_EQ(SP32(0, 0), getProduct32(33, 0));
116 EXPECT_EQ(SP32(6, 0), getProduct32(3, 2));
117 EXPECT_EQ(SP32(UINT16_MAX / 3 * UINT16_MAX / 5 * 2, 0),
119 EXPECT_EQ(SP32(0xf00f1001, 4), getProduct32(0x1001, 0xf00010));
120 EXPECT_EQ(SP32(0xf00f0700, 8), getProduct32(0x1001, 0xf000070));
121 EXPECT_EQ(SP32(0xf00f0801, 8), getProduct32(0x1001, 0xf000080));
136 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 0));
137 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 1));
138 EXPECT_EQ(SP32(0, 0), getQuotient32(0, 73));
139 EXPECT_EQ(SP32(UINT32_MAX, MaxScale), getQuotient32(1, 0));
140 EXPECT_EQ(SP32(UINT32_MAX, MaxScale), getQuotient32(6, 0));
143 EXPECT_EQ(SP32(1u << 31, -31), getQuotient32(1, 1));
144 EXPECT_EQ(SP32(1u << 31, -30), getQuotient32(2, 1));
145 EXPECT_EQ(SP32(1u << 31, -33), getQuotient32(4, 16));
146 EXPECT_EQ(SP32(7u << 29, -29), getQuotient32(7, 1));
147 EXPECT_EQ(SP32(7u << 29, -30), getQuotient32(7, 2));
148 EXPECT_EQ(SP32(7u << 29, -33), getQuotient32(7, 16));
151 EXPECT_EQ(SP32(3u << 30, -30), getQuotient32(9, 3));
152 EXPECT_EQ(SP32(9u << 28, -28), getQuotient32(63, 7));
155 EXPECT_EQ(SP32(0xaaaaaaab, -33), getQuotient32(1, 3));
156 EXPECT_EQ(SP32(0xd5555555, -31), getQuotient32(5, 3));
387 EXPECT_EQ(SP32(1, 0), getSum32(0, 0, 1, 0));
388 EXPECT_EQ(SP32(8, -3), getSum32(0, 0, 8, -3));
389 EXPECT_EQ(SP32(UINT32_MAX, 0), getSum32(0, 0, UINT32_MAX, 0));
392 EXPECT_EQ(SP32(2, 0), getSum32(1, 0, 1, 0));
393 EXPECT_EQ(SP32(3, 0), getSum32(1, 0, 2, 0));
394 EXPECT_EQ(SP32(67, 0), getSum32(7, 0, 60, 0));
397 EXPECT_EQ(SP32(3, 0), getSum32(1, 0, 1, 1));
398 EXPECT_EQ(SP32(4, 0), getSum32(2, 0, 1, 1));
401 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 32, 1, 0));
402 EXPECT_EQ(SP32(UINT32_C(1) << 31, -31), getSum32(1, -32, 1, 0));
405 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1), getSum32(1, 32, 1, 1));
406 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -32), getSum32(1, -32, 1, -1));
409 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 0, UINT32_MAX, 0));
412 EXPECT_EQ(SP32(1, 0), getSum32(1, 0, 0, 0));
413 EXPECT_EQ(SP32(8, -3), getSum32(8, -3, 0, 0));
414 EXPECT_EQ(SP32(UINT32_MAX, 0), getSum32(UINT32_MAX, 0, 0, 0));
415 EXPECT_EQ(SP32(3, 0), getSum32(2, 0, 1, 0));
416 EXPECT_EQ(SP32(67, 0), getSum32(60, 0, 7, 0));
417 EXPECT_EQ(SP32(3, 0), getSum32(1, 1, 1, 0));
418 EXPECT_EQ(SP32(4, 0), getSum32(1, 1, 2, 0));
419 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(1, 0, 1, 32));
420 EXPECT_EQ(SP32(UINT32_C(1) << 31, -31), getSum32(1, 0, 1, -32));
421 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1), getSum32(1, 1, 1, 32));
422 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -32), getSum32(1, -1, 1, -32));
423 EXPECT_EQ(SP32(UINT32_C(1) << 31, 1), getSum32(UINT32_MAX, 0, 1, 0));
467 EXPECT_EQ(SP32(0, 0), getDifference32(1, 0, 1, 0));
468 EXPECT_EQ(SP32(1, 0), getDifference32(2, 0, 1, 0));
469 EXPECT_EQ(SP32(53, 0), getDifference32(60, 0, 7, 0));
472 EXPECT_EQ(SP32(0, 0), getDifference32(2, 0, 1, 1));
475 EXPECT_EQ(SP32(1, 0), getDifference32(1, 0, 0, 0));
476 EXPECT_EQ(SP32(8, -3), getDifference32(8, -3, 0, 0));
477 EXPECT_EQ(SP32(UINT32_MAX, 0), getDifference32(UINT32_MAX, 0, 0, 0));
480 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, 1),
482 EXPECT_EQ(SP32((UINT32_C(1) << 31) + 1, -31),
486 EXPECT_EQ(SP32(UINT32_MAX, 0), getDifference32(1, 32, 1, 0));
487 EXPECT_EQ(SP32(UINT32_MAX, -32), getDifference32(1, 0, 1, -32));
490 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, 1, 0));
491 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, 8, -3));
492 EXPECT_EQ(SP32(0, 0), getDifference32(0, 0, UINT32_MAX, 0));
493 EXPECT_EQ(SP32(0, 0), getDifference32(7, 0, 60, 0));
494 EXPECT_EQ(SP32(0, 0), getDifference32(1, 0, 1, 1));
495 EXPECT_EQ(SP32(0, 0), getDifference32(1, -32, 1, 0));
496 EXPECT_EQ(SP32(0, 0), getDifference32(1, -32, 1, -1));
499 EXPECT_EQ(SP32(UINT32_C(1) << 26, -31),