7TEST(WrappingSetAccumulatorTest, AddWrapAndClear) {
9 ASSERT_TRUE(accumulator.getNonDefaultStates().empty());
10 EXPECT_EQ(0ull, accumulator.getValues()[0]);
12 accumulator.addValue(0, 3);
13 accumulator.addValue(0, 67);
14 accumulator.addValue(2, 3);
15 EXPECT_EQ(std::vector<uint64_t>({0, 2}), accumulator.getNonDefaultStates());
16 EXPECT_EQ(1ull << 3, accumulator.getValues()[0]);
17 EXPECT_EQ(accumulator.getValues()[0], accumulator.getValues()[2]);
18 EXPECT_EQ(0ull, accumulator.getValues()[1]);
20 accumulator.addValue(1, 4);
21 accumulator.addValue(1, 63);
22 EXPECT_EQ((1ull << 4) | (1ull << 63), accumulator.getValues()[1]);
23 EXPECT_LT(accumulator.getValues()[0], accumulator.getValues()[1]);
26 EXPECT_TRUE(accumulator.getNonDefaultStates().empty());
27 for (uint64_t state = 0; state < 4; ++state) {
28 EXPECT_EQ(0ull, accumulator.getValues()[state]) <<
"state " << state;
TEST(RegionConstraintCheckerTest, AffineConstraintHoldsThroughout)
SparseAccumulator< uint64_t > WrappingSetAccumulator
Accumulates a set of indices for each state, where only the index modulo 64 is stored,...