Commit d5f2e2c9 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix compilation warnings with GCC 10

parent 068d66d5
......@@ -246,7 +246,7 @@ public:
public edge_iter_facade<base_edge_iterator<Dereference>>
{
base_edge_iterator() {}
[[gnu::always_inline]] [[gnu::flatten]]
[[gnu::always_inline]]
base_edge_iterator(vertex_t v, typename edge_list_t::const_iterator&& iter)
: _v(v), _iter(std::forward<typename edge_list_t::const_iterator>(iter))
{}
......@@ -346,7 +346,7 @@ public:
reversed>>
{
all_edge_iterator_base() {}
[[gnu::always_inline]] [[gnu::flatten]]
[[gnu::always_inline]]
all_edge_iterator_base(vertex_t v,
typename edge_list_t::const_iterator&& iter,
const typename edge_list_t::const_iterator& pos)
......@@ -373,7 +373,7 @@ public:
{
public:
edge_iterator() {}
[[gnu::always_inline]] [[gnu::flatten]]
[[gnu::always_inline]]
explicit edge_iterator(const typename vertex_list_t::const_iterator& vi_begin,
const typename vertex_list_t::const_iterator& vi_end,
const typename vertex_list_t::const_iterator& vi,
......
......@@ -575,6 +575,7 @@ public:
ConstantPropertyMap(const value_type& c): c(c) {}
ConstantPropertyMap(): c() {}
ConstantPropertyMap(const ConstantPropertyMap& o): c(o.c) {}
const value_type& operator[](const key_type&) const { return c; }
......
......@@ -64,7 +64,7 @@ auto mcmc_sweep(MCMCState state, RNG& rng)
auto beta = state.get_beta();
typedef std::remove_const_t<decltype(state._null_move)> move_t;
constexpr bool single_step =
constexpr bool single_step =
std::is_same_v<decltype(state.move_proposal(vlist.front(), rng)),
move_t>;
......
......@@ -67,9 +67,7 @@ struct get_arf_layout
diff += dx*dx;
delta_pos[j] += dx;
}
diff = sqrt(diff);
if (diff < 1e-6)
diff = 1e-6;
diff = std::max(sqrt(diff), 1e-6);
pos_t m = r/diff;
for (size_t j = 0; j < dim; ++j)
{
......@@ -91,12 +89,12 @@ struct get_arf_layout
}
}
auto dt_ = dt; // workaround clang
for (size_t j = 0; j < dim; ++j)
{
#pragma omp atomic
pos[v][j] += dt_ * delta_pos[j];
delta += abs(delta_pos[j]);
auto dt_j = dt * delta_pos[j];
#pragma omp atomic
pos[v][j] += dt_j;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment