Commit 2bda6735 authored by Paul's avatar Paul
Browse files

Update cppcheck version

parent fd6f1cc6
...@@ -351,11 +351,9 @@ struct onnx_parser ...@@ -351,11 +351,9 @@ struct onnx_parser
if(node.name().empty()) if(node.name().empty())
{ {
std::string generated = "migraph_unnamed_node"; std::string generated = "migraph_unnamed_node";
for(auto&& output : node.output()) return std::accumulate(node.output().begin(), node.output().end(), generated, [](auto x, auto y) {
{ return x + "_" + y;
generated += "_" + output; });
}
return generated;
} }
return node.name(); return node.name();
} }
...@@ -488,11 +486,8 @@ struct onnx_parser ...@@ -488,11 +486,8 @@ struct onnx_parser
break; // throw std::runtime_error("Unsupported type COMPLEX128"); break; // throw std::runtime_error("Unsupported type COMPLEX128");
} }
std::vector<std::size_t> dims; std::vector<std::size_t> dims;
// TODO: USe std::transform auto&& tensor_dims = t.tensor_type().shape().dim();
for(auto&& d : t.tensor_type().shape().dim()) std::transform(tensor_dims.begin(), tensor_dims.end(), std::back_inserter(dims), [](auto&& d) { return d.dim_value(); });
{
dims.push_back(d.dim_value());
}
return {shape_type, dims}; return {shape_type, dims};
} }
}; };
......
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