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

Function compute_common_lens

src/common.cpp:109–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109std::vector<std::size_t> compute_common_lens(const std::vector<shape>& shapes)
110{
111 assert(not shapes.empty());
112 assert(
113 std::none_of(shapes.cbegin(), shapes.cend(), [](auto shape) { return shape.dynamic(); }));
114 return transform_accumulate(shapes.begin() + 1,
115 shapes.end(),
116 shapes.front().lens(),
117 &compute_broadcasted_lens,
118 [](auto s) { return s.lens(); });
119}
120
121static shape::type_t compute_common_type(shape::type_t t1, shape::type_t t2)
122{

Callers 2

common_shapeFunction · 0.85
compute_shapeMethod · 0.85

Calls 8

transform_accumulateFunction · 0.85
dynamicMethod · 0.80
lensMethod · 0.80
frontMethod · 0.80
none_ofFunction · 0.50
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected