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

Function group_axes

src/shape_transform_descriptor.cpp:150–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148// all subdimensions that have that axis.
149template <class Dimensions>
150static std::map<std::size_t, std::vector<dimension::sub*>> group_axes(Dimensions& dimensions)
151{
152 using sub =
153 std::conditional_t<std::is_const<Dimensions>{}, const dimension::sub, dimension::sub>;
154 std::map<std::size_t, std::vector<sub*>> axes_map;
155 for_each_subdimension(dimensions, [&](auto& s) {
156 if(s.origin_axis().empty())
157 return;
158 axes_map[s.origin_axis().front()].push_back(&s);
159 });
160 return axes_map;
161}
162
163// Renumber all axes while preserving the order of the axes
164static void renumber_axes(std::map<std::size_t, std::vector<dimension::sub*>>& axes_map)

Callers 5

renumber_axesFunction · 0.85
resolveMethod · 0.85
regroup_axesMethod · 0.85
simplifyMethod · 0.85
to_src_from_commonMethod · 0.85

Calls 4

for_each_subdimensionFunction · 0.85
frontMethod · 0.80
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected