Commit 970ac115 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 82fee1e7
...@@ -26,9 +26,8 @@ struct convert : unary<convert> ...@@ -26,9 +26,8 @@ struct convert : unary<convert>
template <class Self, class F> template <class Self, class F>
static auto reflect(Self& self, F f) static auto reflect(Self& self, F f)
{ {
return pack(f(self.target_type, "target_type"), return pack(
f(self.scale, "scale"), f(self.target_type, "target_type"), f(self.scale, "scale"), f(self.shift, "shift"));
f(self.shift, "shift"));
} }
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(std::vector<shape> inputs) const
......
...@@ -28,7 +28,7 @@ struct unary : op_name<Derived> ...@@ -28,7 +28,7 @@ struct unary : op_name<Derived>
{ {
argument result{output_shape}; argument result{output_shape};
auto in_shape = args[0].get_shape(); auto in_shape = args[0].get_shape();
if (in_shape.packed()) if(in_shape.packed())
{ {
shape std_in_shape{in_shape.type(), in_shape.lens()}; shape std_in_shape{in_shape.type(), in_shape.lens()};
shape std_out_shape{output_shape.type(), output_shape.lens()}; shape std_out_shape{output_shape.type(), output_shape.lens()};
...@@ -44,8 +44,8 @@ struct unary : op_name<Derived> ...@@ -44,8 +44,8 @@ struct unary : op_name<Derived>
result.visit([&](auto output) { result.visit([&](auto output) {
args[0].visit([&](auto input) { args[0].visit([&](auto input) {
shape_for_each(output.get_shape(), [&](const auto& idx) { shape_for_each(output.get_shape(), [&](const auto& idx) {
output(idx.begin(), idx.end()) = output(idx.begin(), idx.end()) = static_cast<const Derived&>(*this).apply()(
static_cast<const Derived&>(*this).apply()(input(idx.begin(), idx.end())); input(idx.begin(), idx.end()));
}); });
return result; return result;
......
...@@ -200,7 +200,7 @@ void quantize_int8(program& prog, const std::vector<std::string>& ins_names) ...@@ -200,7 +200,7 @@ void quantize_int8(program& prog, const std::vector<std::string>& ins_names)
auto op = ins->get_operator(); auto op = ins->get_operator();
shape ins_shape{}; shape ins_shape{};
// just to compute the output shape // just to compute the output shape
if (ins->name() == "dot") if(ins->name() == "dot")
{ {
ins_shape = compute_shape(op::quant_dot{}, converted_inputs); ins_shape = compute_shape(op::quant_dot{}, converted_inputs);
} }
......
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