Commit dd465fab authored by Paul's avatar Paul
Browse files

Formatting

parent 203a4c4c
......@@ -65,13 +65,18 @@ struct instruction
bool valid(instruction_ref start) const
{
std::vector<shape> shapes(arguments.size());
std::transform(arguments.begin(), arguments.end(), shapes.begin(), [](instruction_ref ins) { return ins->result; });
std::transform(arguments.begin(), arguments.end(), shapes.begin(), [](instruction_ref ins) {
return ins->result;
});
shape computed;
try
{
computed = op.compute_shape(shapes);
}
catch(migraph::exception&) { return false; }
catch(migraph::exception&)
{
return false;
}
return result == computed &&
std::all_of(output.begin(),
output.end(),
......@@ -81,7 +86,8 @@ struct instruction
}) &&
std::all_of(arguments.begin(), arguments.end(), [&](instruction_ref i) {
auto self = std::find(i->output.begin(), i->output.end(), *this);
return self != i->output.end() && std::distance(start, i) < std::distance(start, *self);
return self != i->output.end() &&
std::distance(start, i) < std::distance(start, *self);
});
}
......
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