Commit ce8139e5 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent cced8ba3
...@@ -21,7 +21,7 @@ struct binary ...@@ -21,7 +21,7 @@ struct binary
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(std::vector<shape> inputs) const
{ {
check_shapes{inputs}.has(2).same_type().same_dims(); check_shapes{inputs}.has(2).same_type().same_dims();
if (inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed()) if(inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
......
...@@ -21,7 +21,7 @@ struct unary ...@@ -21,7 +21,7 @@ struct unary
shape compute_shape(std::vector<shape> inputs) const shape compute_shape(std::vector<shape> inputs) const
{ {
check_shapes{inputs}.has(1); check_shapes{inputs}.has(1);
if (inputs.front().packed()) if(inputs.front().packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
......
...@@ -595,7 +595,7 @@ struct cpu_unary ...@@ -595,7 +595,7 @@ struct cpu_unary
std::string name() const { return op.name(); } std::string name() const { return op.name(); }
shape compute_shape(const std::vector<shape>& inputs) const shape compute_shape(const std::vector<shape>& inputs) const
{ {
if (inputs.at(0).packed()) if(inputs.at(0).packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
...@@ -795,7 +795,7 @@ struct cpu_binary ...@@ -795,7 +795,7 @@ struct cpu_binary
std::string name() const { return op.name(); } std::string name() const { return op.name(); }
shape compute_shape(const std::vector<shape>& inputs) const shape compute_shape(const std::vector<shape>& inputs) const
{ {
if (inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed()) if(inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
......
...@@ -45,7 +45,7 @@ struct unary_device : oper<Derived> ...@@ -45,7 +45,7 @@ struct unary_device : oper<Derived>
shape compute_shape(const std::vector<shape>& inputs) const shape compute_shape(const std::vector<shape>& inputs) const
{ {
check_shapes{inputs, *this}.has(2); check_shapes{inputs, *this}.has(2);
if (inputs.at(0).packed()) if(inputs.at(0).packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
...@@ -70,7 +70,7 @@ struct binary_device : oper<Derived> ...@@ -70,7 +70,7 @@ struct binary_device : oper<Derived>
shape compute_shape(const std::vector<shape>& inputs) const shape compute_shape(const std::vector<shape>& inputs) const
{ {
check_shapes{inputs, *this}.has(3); check_shapes{inputs, *this}.has(3);
if (inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed()) if(inputs.at(0) == inputs.at(1) and inputs.at(0).packed() and inputs.at(1).packed())
{ {
return inputs.at(0); return inputs.at(0);
} }
......
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