Commit 5589227b authored by Shucai Xiao's avatar Shucai Xiao
Browse files

fixed a cppcheck error in eliminate_contiguous.cpp file

parent 5e36c210
...@@ -33,11 +33,10 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp ...@@ -33,11 +33,10 @@ static bool try_compute_shape(instruction_ref ins, const std::vector<shape>& inp
for(auto output : outputs) for(auto output : outputs)
{ {
auto args = output->inputs(); auto args = output->inputs();
std::vector<shape> input_shapes; std::vector<shape> input_shapes(args.size());
for(auto arg : args) std::transform(args.begin(), args.end(), input_shapes.begin(), [&](auto& arg) {
{ return (arg == ins) ? new_shape : arg->get_shape();
input_shapes.push_back((arg == ins) ? new_shape : arg->get_shape()); });
}
if(!try_compute_shape(output, input_shapes)) if(!try_compute_shape(output, input_shapes))
{ {
......
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