void into(Bag *);
public:
+ // @brief Return the number of Element-wise transfers
+ //
+ // NOTE size() SHOULD BE identical to range().size()
+ uint32_t size(void) const;
+
// @brief Return a set of elements in the destination bag that Shuffle will update
std::set<ElemID> range(void) const;
ASSERT_EQ(mutable_ptr->asShuffle(), immutable_ptr->asShuffle());
}
+TEST_F(ShuffleTest, size)
+{
+ auto shuffle = allocate();
+
+ shuffle->insert(coco::ElemID{3}, coco::ElemID{2});
+ shuffle->insert(coco::ElemID{3}, coco::ElemID{5});
+
+ ASSERT_EQ(shuffle->size(), 2);
+ ASSERT_EQ(shuffle->range().size(), shuffle->size());
+}
+
TEST_F(ShuffleTest, range)
{
auto shuffle = allocate();