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

Function remove_1_sub_dims

src/shape_transform_descriptor.cpp:992–1000  ·  view source on GitHub ↗

Remove subdimensions of 1

Source from the content-addressed store, hash-verified

990
991// Remove subdimensions of 1
992static void remove_1_sub_dims(std::vector<dimension::sub>& subdimensions)
993{
994 subdimensions.erase(std::remove_if(subdimensions.begin(),
995 subdimensions.end(),
996 [&](const dimension::sub& d) { return d.len == 1; }),
997 subdimensions.end());
998 if(subdimensions.empty())
999 subdimensions.push_back({1, {}});
1000}
1001
1002void dimension::simplify()
1003{

Callers 1

simplifyMethod · 0.85

Calls 5

eraseMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected