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

Function remove_empty_sub_dims

src/shape_transform_descriptor.cpp:190–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190static void remove_empty_sub_dims(std::vector<dimension::sub>& subdimensions)
191{
192 subdimensions.erase(std::remove_if(subdimensions.begin(),
193 subdimensions.end(),
194 [&](const dimension::sub& d) {
195 return d.len == 1 and d.origin_axis().empty();
196 }),
197 subdimensions.end());
198 if(subdimensions.empty())
199 subdimensions.push_back({1, {}});
200}
201
202static std::size_t len(const std::vector<dimension::sub*>& subs)
203{

Callers 1

rebaseMethod · 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