"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "2f4725b4f1f01591eb920b052e54e6f5b34188c6"
Commit 2bda6735 authored by Paul's avatar Paul
Browse files

Update cppcheck version

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