fix clang format style

This commit is contained in:
Michael Krasnyk 2017-03-07 14:14:10 +01:00 committed by Patrick Niklaus
parent d575561d39
commit 6f9aea4e56
3 changed files with 9 additions and 7 deletions

View File

@ -23,7 +23,7 @@ template <typename T> std::size_t msb(T value)
msb++;
}
BOOST_ASSERT(msb > 0);
return msb-1;
return msb - 1;
}
#if (defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)) && __x86_64__

View File

@ -106,12 +106,14 @@ template <typename DataT> class SharedMemoryWrapper
return m_ptr[index];
}
const DataT &front() const {
const DataT &front() const
{
BOOST_ASSERT_MSG(m_size > 0, "invalid size");
return m_ptr[0];
}
const DataT &back() const {
const DataT &back() const
{
BOOST_ASSERT_MSG(m_size > 0, "invalid size");
return m_ptr[m_size - 1];
}

View File

@ -69,7 +69,7 @@ void partitionLevel(const std::vector<BisectionID> &node_to_bisection_id,
return lhs | node_to_bisection_id[rhs];
});
// masks all bit strictly higher then cell.bit
BOOST_ASSERT(sizeof(unsigned long long)*CHAR_BIT > sizeof(BisectionID)*CHAR_BIT);
BOOST_ASSERT(sizeof(unsigned long long) * CHAR_BIT > sizeof(BisectionID) * CHAR_BIT);
const BisectionID mask = (1ULL << (cell.bit + 1)) - 1;
BOOST_ASSERT(mask == 0 || util::msb(mask) == cell.bit);
const auto masked_sum = sum & mask;
@ -120,8 +120,8 @@ bisectionToPartition(const std::vector<BisectionID> &node_to_bisection_id,
std::iota(permutation.begin(), permutation.end(), 0);
std::vector<CellBisection> cells;
cells.push_back(
CellBisection{0, static_cast<std::uint32_t>(node_to_bisection_id.size()), NUM_BISECTION_BITS-1, false});
cells.push_back(CellBisection{
0, static_cast<std::uint32_t>(node_to_bisection_id.size()), NUM_BISECTION_BITS - 1, false});
std::vector<Partition> partitions(max_cell_sizes.size());
std::vector<std::uint32_t> num_cells(max_cell_sizes.size());