Commit c3861fb1 authored by charlie's avatar charlie
Browse files

formatting

parent d9cd32a4
......@@ -209,7 +209,6 @@ shape shape::from_permutation(type_t t,
return result;
}
shape::type_t shape::type() const { return impl->m_type; }
const std::vector<std::size_t>& shape::lens() const { return impl->m_lens; }
......@@ -448,22 +447,14 @@ std::vector<std::size_t> shape::opt_lens() const
;
}
bool shape::dynamic_dimension::is_fixed() const
{
return this->min == this->max;
}
bool shape::dynamic_dimension::is_fixed() const { return this->min == this->max; }
bool shape::dynamic_dimension::has_optimal() const
{
return opt != 0;
}
bool shape::dynamic_dimension::has_optimal() const { return opt != 0; }
template <class Self, class F>
auto shape::dynamic_dimension::reflect(Self& self, F f)
{
return pack(f(self.min, "min"),
f(self.max, "max"),
f(self.opt, "opt"));
return pack(f(self.min, "min"), f(self.max, "max"), f(self.opt, "opt"));
}
bool operator==(const shape::dynamic_dimension& x, const shape::dynamic_dimension& y)
......@@ -561,23 +552,14 @@ void migraphx_from_value(const value& v, shape& s)
{
auto v_dd = v.at("dynamic_dimensions");
std::vector<shape::dynamic_dimension> dyn_dims(v.at("dynamic_dimensions").size());
std::transform(
v_dd.begin(),
v_dd.end(),
dyn_dims.begin(),
[](migraphx::value x)
{
std::transform(v_dd.begin(), v_dd.end(), dyn_dims.begin(), [](migraphx::value x) {
auto x_min = x.at("min").template to<size_t>();
auto x_max = x.at("max").template to<size_t>();
auto x_opt = x.at("opt").template to<size_t>();
return shape::dynamic_dimension{x_min, x_max, x_opt};
}
);
});
s = shape{
shape::parse_type(t),
dyn_dims
};
s = shape{shape::parse_type(t), dyn_dims};
}
}
}
......
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