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

Method common_dims

src/shape_transform_descriptor.cpp:1932–1946  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1930 [](const auto& s) { return s.len(); });
1931}
1932std::vector<std::size_t>
1933shape_transform_descriptor::common_dims(const std::vector<std::size_t>& input_dims) const
1934{
1935 std::vector<std::size_t> result;
1936 for(const auto& d : dimensions)
1937 {
1938 std::transform(d.subdimensions.begin(),
1939 d.subdimensions.end(),
1940 std::back_inserter(result),
1941 [&](const dimension::sub& s) { return get_len(s, input_dims); });
1942 }
1943 if(result.empty())
1944 result.resize(rank, 1);
1945 return result;
1946}
1947
1948std::size_t shape_transform_descriptor::common_rank() const
1949{

Callers 3

TEST_CASEFunction · 0.80
applyMethod · 0.80
applyMethod · 0.80

Calls 6

get_lenFunction · 0.85
resizeMethod · 0.80
transformFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected