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

Function verify_shape

test/reduce_dims.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static bool verify_shape(const migraphx::shape& s1, const migraphx::shape& s2)
40{
41 if(s1.elements() != s2.elements())
42 return false;
43 return migraphx::all_of(migraphx::range(s1.elements()),
44 [&](auto i) { return s1.index(i) == s2.index(i); });
45}
46
47template <class Range1, class Range2>
48static bool verify_shapes(const Range1& r1, const Range2& r2)

Callers 1

verify_shapesFunction · 0.85

Calls 4

all_ofFunction · 0.50
rangeFunction · 0.50
elementsMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected