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

Function get_len

src/shape_transform_descriptor.cpp:1398–1412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396}
1397
1398static std::size_t get_len(const dimension::sub& s, const std::vector<std::size_t>& input_dims)
1399{
1400 if(input_dims.empty())
1401 return s.len;
1402 if(s.axis.empty())
1403 return s.len;
1404 auto dim = input_dims.at(s.axis.front());
1405 if(dim == 0)
1406 return s.len;
1407 if(dim == 1)
1408 return 1;
1409 if(s.axis.size() == 1)
1410 return dim;
1411 return s.len;
1412}
1413
1414static operation make_reshape_squeeze(const std::vector<dimension>& new_dims)
1415{

Callers 1

common_dimsMethod · 0.85

Calls 4

atMethod · 0.80
frontMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected