MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / flatten

Function flatten

src/argument.cpp:107–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107std::vector<argument> flatten(const std::vector<argument>& args)
108{
109 std::vector<argument> result;
110 for(const auto& arg : args)
111 {
112 if(arg.get_shape().type() == shape::tuple_type)
113 {
114 auto subs = flatten(arg.get_sub_objects());
115 result.insert(result.end(), subs.begin(), subs.end());
116 }
117 else
118 {
119 result.push_back(arg);
120 }
121 }
122 return result;
123}
124
125std::vector<shape> to_shapes(const std::vector<argument>& args)
126{

Callers

nothing calls this directly

Calls 7

typeMethod · 0.45
get_shapeMethod · 0.45
get_sub_objectsMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected