"...linux/git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "e14a2e0ce72034068b69657e0936df3c80673853"
Commit dd465fab authored by Paul's avatar Paul
Browse files

Formatting

parent 203a4c4c
......@@ -65,15 +65,20 @@ 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(),
std::all_of(output.begin(),
output.end(),
[&](instruction_ref i) {
return std::find(i->arguments.begin(), i->arguments.end(), *this) !=
......@@ -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