Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdol committed Nov 15, 2024
1 parent 52d6f6b commit 82691e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions compute/cker/include/cker/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,12 @@ inline std::ostream &operator<<(std::ostream &os, const Shape &shape)
return std::move(joined).append(std::to_string(dim)).append(",");
});

if (formatted.back() == '[') {
if (formatted.back() == '[')
{
formatted.push_back(']');
} else {
}
else
{
formatted.back() = ']';
}

Expand Down
4 changes: 2 additions & 2 deletions compute/cker/src/ShapeIterator.test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ TEST(CKer_Utils, ShapeIterator_basic)
// test and demostrate the usage of iterators with STL algos
const auto first = begin(test_shape);
const auto last = end(test_shape);
const auto shape_elems = std::accumulate(first, last, 1, std::multiplies<ShapeIterator::value_type>{});
const auto shape_elems =
std::accumulate(first, last, 1, std::multiplies<ShapeIterator::value_type>{});
EXPECT_EQ(shape_elems, test_shape.FlatSize());
}

Expand All @@ -105,4 +106,3 @@ TEST(CKer_Utils, neg_ShapeIterator_empty_shape)
EXPECT_EQ(ss.str(), "[]");
}
}

0 comments on commit 82691e3

Please sign in to comment.