Commit 0bd4e8bb authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 60a0f286
...@@ -32,7 +32,7 @@ struct reshape ...@@ -32,7 +32,7 @@ struct reshape
{ {
check_shapes{inputs, *this}.has(1).standard(); check_shapes{inputs, *this}.has(1).standard();
// input shape is dynamic, return dim directly // input shape is dynamic, return dim directly
if (inputs.front().dynamic()) if(inputs.front().dynamic())
{ {
std::vector<std::size_t> rdims(dims.begin(), dims.end()); std::vector<std::size_t> rdims(dims.begin(), dims.end());
return {inputs.front().type(), rdims}; return {inputs.front().type(), rdims};
......
...@@ -301,7 +301,7 @@ argument instruction::eval(bool check_eval) const ...@@ -301,7 +301,7 @@ argument instruction::eval(bool check_eval) const
{ {
return this->get_literal().get_argument(); return this->get_literal().get_argument();
} }
else if (op.name() == "shape") else if(op.name() == "shape")
{ {
argument arg{this->inputs().front()->get_shape()}; argument arg{this->inputs().front()->get_shape()};
return normalized_operator().compute(result, {arg}); return normalized_operator().compute(result, {arg});
......
...@@ -274,7 +274,8 @@ bool shape::scalar() const ...@@ -274,7 +274,8 @@ bool shape::scalar() const
bool shape::dynamic() const bool shape::dynamic() const
{ {
if (scalar()) return false; if(scalar())
return false;
const auto& lens = this->lens(); const auto& lens = this->lens();
return std::find(lens.begin(), lens.end(), 0) != lens.end(); return std::find(lens.begin(), lens.end(), 0) != lens.end();
} }
......
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